Collaborative Adaptation for Recovery from Unforeseen Malfunctions in Discrete and Continuous MARL Domains