The German chancellor's conservative party has voted in favour of a coalition deal with the centre-left Social Democrats.