Basic k-means clustering in Objective-C