Add O(N*log(N)) kd-tree construction algorithm

please refer to "On building fast kd-Trees for Ray Tracing, and on doing
that in O(N log N)" for further detail.