Foxconn is investing in India, Vietnam, and other countries as Apple hopes to diversify iPhone production out of China.