Google’s AI push pays off with solid second quarter, but doubts about company’s future persist