When did the Qing surrender to the British