mon: slurp latest state from active monitors before joining quorum
If a monitor has been down and is behind, and joins the quorum, the
other nodes will try to send it all of the needed state, which can
bring the cluster to a halt.
Instead, implement a new bootstrap() procedure:
- probe the cluster nodes
- if there is an existing quorum,
- and it is not too far ahead of me, join it (call an election)
- otherwise, slurp down all the newer state and then restart (bootstrap)
- if we see enough online nodes that are not part of the quorum, call
an election.
We still need to add some timeouts.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>