[MAINT] WIP: Add unit tests for kD-tree.

This fixes #154.