First pass event loop implementation.
fix processing of unit_upkeeper for tracker events
Fix the engine's APM plugin and add some documentation.
Fix some small rebase bugs.