Fixed bug when multiple KDT elements have the same value along a given axis.
Generalized KdMap/Tree to handle axis value types that are instances of Real (instead of just Double).