Multiple servers in one SqlBagOStuff

Added a multi-server feature to SqlBagOStuff.

Tests done:
* With both the "shard" and multi-server features enabled and
  $wgAllDBsAreLocalhost, tested getMulti, set, incr, decr, keys,
  garbageCollect, deleteAll. Tested wiki page views with
  $wgMainCacheType set to such a cache.
* Tested connection errors.
* In the plain CACHE_DB configuration, tested wiki page views.

Change-Id: Ifba0d276ef724cc9b33f687bc0adae4637054328
Use consistent hashing for SqlBagOStuff servers

Also factor out consistent hash code from Redis and the new application
into a class called ArrayUtils. The name "ArrayUtils" is from
I0f4e7d7c, I expect that change will be rebased on top of this one at
some point.

Change-Id: I9375087f4d7a6e8e629d97bfb6b117d9cb7d1bcf
Merge "Multiple servers in one SqlBagOStuff" into wmf/1.21wmf7
Merge "Use consistent hashing for SqlBagOStuff servers" into wmf/1.21wmf7