KMeans, now with adjustable distance measurer.

Also, deprecated untyped apply on HclAnalysisController