YARN-1640. Fixed manual failover of ResourceManagers to work correctly in secure clusters. Contributed by Xuan Gong. svn merge --ignore-ancestry -c 1579510 ../../trunk/