Foreigners are still investing in the United States. But the country’s economic standing is still eroding.