Polls in two German states on Sunday resulted in severe losses for the country's leading Christian Democratic Union party.