Microsoft and Google's parent company both beat Wall Street's Q1 expectations. Their CEOs say that's thanks to AI.