Germany has long attracted skilled workers to its labor market. The country has been much less successful at retaining them.