YARN-2456. Possible livelock in CapacityScheduler when RM is recovering
apps. Contributed by Jian He