ExxonMobil and Chevron posted sharply higher second-quarter profits as Iran war oil prices and refining margins boosted results. Chevron beat estimates, while Exxon topped revenue expectations.