Alibaba's shares surged as the e-commerce giant made progress in its partnership with Apple to roll out artificial-intelligence features in China.