HBASE-8344. Improves the assignment when node failures happen to choose the secondary RS as the new primary RS

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1491994 13f79535-47bb-0310-9956-ffa450edef68
HBASE-8700 IntegrationTestBigLinkedList can fail due to random number collision

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1492034 13f79535-47bb-0310-9956-ffa450edef68