[tor-commits] [tor/master] test: Move duplicate HS test code and unify it