The threat of climate change is driving China and the U.S. — frequent rivals and the world’s two largest greenhouse-gas emitters — to collaborate on dozens of potential clean-energy breakthroughs.