For years, foreign companies plowed the profits they made in China back into the country. Not anymore.