German court rules longest rail strike yet can go ahead