What might have been an alternate outcome had the Qing dynasty successfully modernized in response to western imperialism?