Add timer class and method to analyze kd-tree construction and traversal performance.
Fix merge conflict.