Codechange: Make kdtree member functions const for const-correctness (#13099)