Germany's president said the rise of the far right and increasing antisemitism posed a growing threat to the country's democracy.