Canceled railway and hydroelectric projects in Myanmar, and riots in Vietnam over China’s move to drill for oil in disputed waters, reflect the backlash that the country’s resource hunger can generate. But China is also certain to learn from its mistakes, and its leaders have a clear vision of where to place their long-term economic bets.