moving KDTree from core to ml

As we refactored ml module, I think it is useful to move KDTree from core to ml.
this change will likely break some code. At least it breaks letter_recog sample. Please, search globally for all the KNearest use and check all the use cases.