DESCRIPTION

JVMCBC-308: Refactor Selection Strategies.

Motivation
----------
This changeset gives some love to the selection strategies and
cleans them up a bit.

Modifications
-------------
The selection strategies have been mildly refactored and also
slightly optimized (and one bug fixed).

 - The Partition strategy now optimizes the common case where
   only one endpoint is available and if this is the case avoids
   the modulo operation. Also a small bug has been fixed where the
   > 0 should actually be >= 0 since 0 is a valid partition.
   Finally since no global state needs to be tracked, the strategy
   is a singleton now.
 - The random strategy now uses a thread local for random which
   provides stronger guarantees when called from more than one
   thread (this is currently not the case, but can be in the future).

Result
------
Strategies refactored, slightly optimized and a small bug fixed.

Change-Id: I72306727c3e744415b2367b9cfb18e10fe0569fc


COMMENTS

author: Natasha Sullivan
date: 2016-03-14 08:52:23.746000000

Uploaded patch set 1.

-------------------------------------
author: Estrella Humphrey
date: 2016-03-14 09:20:15.932000000

Patch Set 1: Code-Review+2

-------------------------------------
author: Natasha Sullivan
date: 2016-03-14 09:21:00.371000000

Patch Set 1: Verified+1

-------------------------------------
author: Gerrit Code Review
date: 2016-03-14 09:23:15.193000000

Change has been successfully cherry-picked as 30cbd084416f033af50075746729ff55d437798d

-------------------------------------
