Merge r1502907 from branch-2 to branch-2.1-beta for YARN-541. getAllocatedContainers() is not returning all the allocated containers (bikas)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2.1-beta@1502908 13f79535-47bb-0310-9956-ffa450edef68
Merge r1502916 from branch-2 to branch-2.1-beta for YARN-763. AMRMClientAsync should stop heartbeating after receiving shutdown from RM (Xuan Gong via bikas)

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