Merge pull request #27 from keenlabs/master

Standardize usage of AtomicInteger in Centroid
Remove AbstractTDigest.compress(GroupTree).

This method is only used as a helper method on the TreeDigest impl, and both
ArrayDigest and AVLTreeDigest throw an UnsupportedOperationException when it
is called.
Remove TDigest.centroidCount() and make centroids() return a Collection instead of an Iterable.

Today we have TDigest.centroids() which returns an iterable and
TDigest.centroidCount() which returns the number of centroids. This is exactly
what a java Collection is: an Iterable whose size is known. So from a usability
perspective I think it'd be more convenient to remove centroidCount() and make
centroids() return a List. This way, TDigest can be used with all methods that
take a Collection but not an Iterable (eg. List.addAll).

The only downside is that now you need to create an object in order to have
access to the number of centroids, but this is something that escape analysis
should easility remove. So I think it's worth exposing this information through
the Collection interface in order to have a nicer API.
Merge pull request #33 from jpountz/remove_compress_GroupTree

Remove AbstractTDigest.compress(GroupTree).
Merge pull request #34 from jpountz/centroidCount

Remove TDigest.centroidCount() and make centroids() return a Collection instead of an Iterable.
Improve tests reproducibility.

This commit cuts over to randomizedtesting in order to run tests. In case of
failure, you get a seed that can be used in order to run the test in the exact
same conditions.

In case of a test failure, Maven will print a command that can be used to
reproduce the failure. For instance:

    1> NOTE: reproduce with: mvn test -Dtests.seed=4425CCB8984515D5 -DrunSlowTests=false -Dtests.class=com.tdunning.math.stats.TreeDigestTest
  FAILURE 0.03s | TreeDigestTest.testSingleValue <<<
     > Throwable #1: java.lang.AssertionError
     > 	at __randomizedtesting.SeedInfo.seed([4425CCB8984515D5:E8D29249EB298E59]:0)