Friedrich Merz's bid to become Germany's 10th chancellor has unexpectedly failed in the first round of voting in parliament.