Malaysia's emergence as an artificial-intelligence manufacturing hub marks a striking turnaround for the country.