Wall Street closed a quiet session with a moderate advance Thursday, with energy and other commodities companies leading the market as oil prices extended their record-breaking run. The price of crude oil swept past $124 a barrel in late New York Mercantile Exchange trading, while gasoline rose to a new record of its own at the pump, climbing to a national average of nearly $3.65 a gallon. Some of the big gainers were the companies that would benefit the most from higher commodities prices – the oil companies and metals producers like Alcoa – and they helped lift the major indexes. Stocks also rose after retailers issued April sales results that, while not strong overall, were less gloomy than expected. Financial stocks were the worst performers of the day.