Move kmeans calculations to c, drop speed/min_diff options

Performance on a 4269x2867 image went from ~60s to 2.9s
Now I need to figure out how to package this porperly