clustering: implement k-means for 2D images

* Computes the k-means clustering using patches of the image, instead
  of individual pixels. This implementation makes heavy use of Numpy.

* This solution is not performance or memory friendly. Unfortunately,
  I later realized that Scipy already has an implementation of k-means.
  Use that version instead.