Alphabet posts record quarter as billions in AI spending pay off