Clarify container exit logic

Condensed three variables into one variable with three states.  Clarified logic handling these states.
golint: `agent.go:384:6: exported type ExitCause should have comment or be unexported`