Create kdtree.cpp

My implementation of a KD-tree structure.