Germany overtook Japan as the world’s third largest economy after new figures showed Tokyo had slipped into a technical recession.