Added KD-Tree

Added a generic KD-Tree implementation.
Added a fast version of MinDist clustering.
It uses a kd-tree structure to find the closest points.

Improving the algorothims with the addition of generics.