Allow skip straight to global phase

When rebalancing a DB-per-user cluster with small Q values its typical
that

a) the local phase takes a loooong time, and
b) the local phase doesn't suggest any moves

While the local phase should still run at least once, we'll expose a
flag to skip straight to the global phase since we'll need to run the
plan generator many many times and we can't afford to wait.

BugzID: 24680
Fix two bugs in the global balancing phase

* Nodes with 0 shards were being ignored because wrong datatype.
* The limit was being ignored because max not min.

BugzID: 24680
Stop donating once the target level is achieved

Also switched to a record accumulator for clarity.

BugzID: 24466
Refactor global candidate selection

The old approach was getting unwieldy, hopefully this makes the tests
more explicit.

BugzID: 24466
Allow targets to exceed floor, add another check

Sometimes we want to transfer a shard to a target even though it's
already at the floor.  We add another check to make sure we're not
wasitng effort -- the difference in shard counts between the source and
the target must be 2 or greater.

We also refactor the global shard count code to avoid future atom /
binary problems.

BugzID: 24466
Suggest moves from all donor nodes in parallel

Previously the generator would suggest all moves from the first node
before moving onto the second one.  In the case where the quantum of
jobs is much smaller than the number of moves per node this results in
the other donors being neglected for long periods.

BugzID: 24612
Allow for rebalancing "special" DBs

For example, _replicator or _users.

BugzID: 24612
Write plan to /tmp/rebalance_plan.txt

Was a request by @mattwhite to help with automation.  I was fairly
sloppy in the implementation here, could leave this off and do a better
job next time.
Merge pull request #64 from cloudant/24680-allow-skip-to-global

Various and sundry improvements to rebalancing.

BugzID: 24680