Bug fix in computing the dataset_centroid in NearestCentroid

A bit more of vectorization and minor code optimizations were added
Merge pull request #3750 from MechCoder/bug_nearest_centroid

[MRG+2] : Bug fix in computing the dataset_centroid in NearestCentroid