Improve shutdown of JobManager (graceful exit of runing jobs and RPC service)