Caterpillar beat Wall Street estimates for second-quarter profit on Tuesday, as higher prices and easing manufacturing costs countered moderating