k-d tree sorting in all dimensions in Nlog^2N