Cemex, the Mexican building-materials giant, has reshaped itself by selling far-flung assets to focus on the Americas and cut debt, courting investors anew.