[WIP] Scheduler refactor

Lessons learned from integration with the agent. It's mostly about making sure changes in the agents are properly reflected in the scheduler. Also, better abide the new style conventions (variables with terse and context-dependent names; chans with `c` suffix; more whitespace around expression-blocks; etc.)