Germany's economic growth has slowed as export weakness offset a rise in domestic demand.