Xiaomi overtakes Apple as the world’s No. 2 smartphone maker as the Chinese company took 17% of the market