[tor-commits] [tor/master] dirvote: Extract shared functions to common file