Thanks Andros for report, fixed test_kdtree.cpp

(the last "Walter" test was using int instead of double),
I also fixed a few compiler problems with MSVC2010.