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