The wheels are coming off the world’s biggest auto market after decades of blistering growth, as a prolonged sales slump closes thousands of Chinese dealerships and idles factories.