[tor-commits] [tor/master] Extract simple integer math into its own module