The cloud giant's record quarter came with a reminder of just how expensive its artificial intelligence build-out has become.