Fixed deadlock when cleaning up a process.

Review: https://reviews.apache.org/r/9916

git-svn-id: https://svn.apache.org/repos/asf/incubator/mesos/trunk@1456303 13f79535-47bb-0310-9956-ffa450edef68