The rise of both Germany’s far-right and -left signals a significant shift for a country that founded its post-war political system on stability and moderation.