[minor] use constant for agent status changes in scheduler
[medium] prevent agentdestroy module from removing executable in use
[medium] add "idle" status to agents that stop sending heartbeats