Apple loses its top spot in China to Huawei and Vivo, facing challenges from local competitors and falling sales.