[tor-commits] [tor/master] Refactor common code out of reachability checks