Records show $37 million so far, dwarfing the spending of William C. Thompson Jr., Mr. Bloomberg’s chief Democratic opponent.