UMC: Unified Resilient Controller for Legged Robots with Joint Malfunctions