Implement job stop/undeploy grace period

Grace period will deregister a running container first
and wait specified number of seconds before stopping
or undeploying.