Use subsystems architecture in more places
We introduced a "subsystems" architecture in Tor 0.3.5, where each module registers functions for setting itself up and tearing itself down. We now use this mechanism in
core/mainloop. We should push its usage through the rest of
core, and into more of
We shouldn't try to do this all in one go. Please open subtickets for individual modules.