Foxconn, which manufactures more than 40 percent of the world’s electronics for such companies as Apple, Dell, Amazon and others, has pledged to sharply curtail the number of working hours within its Chinese factories and significantly increase wages, a move that could improve working conditions across China.