kdtree search and creation multithreaded

kdtree search and creation multithreaded