China is the world's largest emitter of greenhouse gases, using fossil fuels to drive rapid industrialisation. So why is it now investing billions of dollars in green technology?