kdtree integrated

not working well for now. need to fix it. seem to not evaluate distance
correctly during a query. A lot of print are added in this commit to try
to fix the problem.
Old hashgrid are deleted