Foxconn, the contract manufacturer whose biggest customer is Apple, is preparing genuinely representative labour union elections in its factories in China for the first time, a powerful sign of changes in the workshop of the world demanded by an increasingly restive workforce.