moving KDTree from core to ml

As we refactored ml module, I think it is useful to move KDTree from core to ml.
let's write something like <pre>enum { BRUTE_FORCE=1, KDTREE=2, DEFAULT=BRUTE_FORCE }</pre>