Google parent company Alphabet Inc. posted stronger-than-expected results for its second quarter, a sign that it’s massive artificial intelligence spending…