Make some machine/unit agent tests more robust. Account for a case where machine may be marked as dead part way through agent startup
Rework detection that machine is dead
EnsureErrTerminateAgent is propagated
Looks like we need to propogate ErrDead all the way back to the caller
Fix errors
Do not wrap ErrDead in updateSupportedContainers
Merge pull request #612 from wallyworld/fix-machine-test

Make some machine/unit agent tests more robust

Fixes: https://bugs.launchpad.net/juju-core/+bug/1361721

If a machine is marked as Dead part way through agent startup, as happens in some tests, the agent exits without realising it needs to terminate.