YouTube ad revenue provided a bright spot in an otherwise mixed quarter for Google parent Alphabet.