China must learn lessons from stock market rout