Crypto, AI, betting firms lead record $517M midterm spend