German court backs president over far-right 'nutcase' comment