estimate_k_max function

Estimate Maximum Neighbors for kd-Tree Thinning