Fix most compilation errors for KMeans

Still need to fix boost serialization recursive template error...
Merge branch 'master' of https://github.com/damsl/K3-Core