U.S. inflation slowed last month and a measure of underlying price pressures also cooled, as higher oil and gas prices had a limited impact on broader costs in the economy.