Fix for PUB-120. This was already implemented in K-means2, so just sharing that code with K-means1 now.
Merge branch 'master' of https://github.com/0xdata/h2o