How Germany took in one million refugees but dodged a populist uprising