About a decade ago, as Walmart suffered under increasingly negative publicity, the company set out on an effort to green its reputation — and make money in the process. Now, Walmart is leading a green revolution in China.