Inflation cooled last month, as falling gasoline prices helped to offset rising rents. News of a smaller-than-expected jump in the cost-of-living triggered a rally on Wall Street.