Various Agent refactoring

* Track target state of jobs scheduled to Agent in AgentState
* Use tracked state rather than asking Registry what to do on Agent.Purge
* Simplify interaction between Agent and AgentState