Refactor periodic event system so each subsystem "owns" its own periodic events
There's a lot of bogus includes in our codebase (where low-level modules depend on high-level ones). We want that to happen less in our refactoring. One main cause of this is that mainloop.c has all of the peroidic events in the code. Instead, we should have each module own its own periodic events.