[tor-commits] [tor/release-0.2.2] Refactor HS client state-clearing code into a separate function