OPT: Made the following changes
1. Prevent recomputing centroids.
2. Precompute the squared_norms as much as possible, and remove
call to pairwise_distances_argmin_min