China has replaced the head of its securities regulator, as public anger over the meltdown in the stock market grows.