Amazon beats on earnings as ad sales surge. But Microsoft's cloud growth may steal the show