Make periodic events array with flags including when they are enabled/disabled
This is part of legacy/trac#25500 (moved) bigger ticket.
The goal here is to put the periodic events (not the per-second callbacks) into an array of objects where an object has flags and enable/disable switch.
So far, the flags would indicate conditions on when to run the callbacks. One of them would be "do not run if disable network is on".
The object also needs to tell for which "tor entity" the callbacks applies. For instance, a certain callback would only apply to Client. Or a callback is only for Dirauth.
Probably more (or less) things will be added to the object as we start implementing.