The last days of the Qing Dynasty were marked by civil unrest and foreign invasions