Google beat Q4 earnings and hit record revenue, but shares fell after hours as investors focused on rising AI spending plans.