YARN-223. Change processTree interface to work better with native code. Merge patch from trunk.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-trunk-win@1428155 13f79535-47bb-0310-9956-ffa450edef68