Alibaba has seen its core e-commerce business squeezed by price wars and sluggish consumption amid an expensive push into artificial intelligence.