China’s economy is flailing. Here’s how its problems could spill into global markets.