k-means clustering implementation in C. This version only works on 2D data.