The e-commerce giant reports a doubling in net profit thanks partly to a surge in cloud business as Zuckerberg’s firm comes unstuck.