[tor-commits] [tor/master] test/circuitstats: Refactor common code