Friedrich Merz wins on second ballot to become Germany’s chancellor, hours after his historic defeat