Very basic k-means algorithm for use in hadoop.