Foreigners are fleeing from Asia’s hottest markets this year, as exuberance in the artificial-intelligence trade gives way to fears about an oil-driven inflation shock.