Rewrote the simple KDTree for javascript. Added test project and test example.