Initial support for testing multiple masters in hbase-89

Summary: Porting some plumbing from Apache HBase trunk to hbase-89 that would
allow to test multiple masters (e.g. various failure scenarios). To do that we
need to maintain a list of thread objects, each holding a reference to an
HMaster, instead of just a single HMaster reference. No multi-master tests are
being added yet -- before that is done, master znode wait needs to be moved out
from the constructor. However, I'd like to get this in as a first step towards
testing HBase 89 master more thoroughly. Most of the code in this diff comes
directly from Apache HBase trunk.

Test Plan: Existing unit tests pass.

Reviewers: kranganathan, jgray, nspiegelberg

Reviewed By: kranganathan

CC: hbase-eng@lists, kranganathan, mbautin

Differential Revision: 336813

Revert Plan: OK

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89@1182039 13f79535-47bb-0310-9956-ffa450edef68
5 files changed