Merge r1529251 from trunk to branch-2 for YARN-1232. Configuration to support multiple RMs (Karthik Kambatla via bikas)