Rework the event handling for the program agent so that both the
reload and halt events send proper completion events. This is required for stoprun and startrun to work correctly. On stoprun the logs are not collected until the programs have stopped, and on startrun we do not want to proceed until all the agents have reloaded their environments.
Showing with 217 additions and 95 deletions