[tor-commits] [tor/release-0.2.2] Split out owning-controller-loss shutdown code into a function