House of Lords defeats government plans to scrap EU rights charter after Brexit