add counter of distance calls
make MaxHeap funcs inline
add ckdtree & comparison code