Added exit hook to clean up container processes on shutdown or reload

I also reduced the amount of locking necessary to coordinate multiple
containers in multiple projects