China’s transition has caused a problem for the government — how to avert a sharp slowdown while keeping a lid on debt.