agent: Events() returns map, not slice

This makes a lot of things easier for the scheduler.
scheduler: update to use new Events() return type