President Barack Obama pledged deeper U.S. cuts in greenhouse-gas emissions and China will for the first time set a target for capping carbon emissions under an agreement between the world’s two biggest economies.