[tor-commits] [tor/master] touchups and refactorings on bug 18616 branch