agent: Events yields map, not slice

This makes things much easier in clients of the agent.
scheduler: neu: test state machine