manually merged cpu kd tree fixes
Merge branch 'master' of https://github.com/ishaan13/PhotonMapper