Added more changes connected with versions with/without distances.

Bug in learnOptimalK. Need to implement new SampleSet constructor and
swapSamples friend function.