SAN FRANCISCO (Reuters) - In a landmark development for the way Western companies do business in China, Apple Inc said Thursday it had agreed to work with partner Foxconn to substantially improve wages and working conditions at the factories that produce its wildly popular products.