Merge r1586523 from branch-2. YARN-1903. Set exit code and diagnostics when container is killed at NEW/LOCALIZING state. Contributed by Zhijie Shen

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