German Chancellor Angela Merkel's Bavarian allies suffer a historic setback in state election, losing votes to the far-right and the Greens.