Record number of foreclosures in third quarter