Prefer smaller total shard count as tie-breaker

Previously each DB would be rebalanced without regard to the other
databases on the cluster.  This patch looks for a
rebalance/count_by_node view defined as

function(doc) {
  if(doc['by_node']) {
    for (var node in doc['by_node']) {
      emit(node, doc['by_node'][node].length);
    }
  }
}

with a "_sum" reduce and uses the global status to prefer nodes that
have a smaller total number of shards on them.

It needs to be improved so that a series of moves are reflected in the
global counts.