Alibaba AI outlays dent profit despite best revenue growth in years