Function heapSort

Heap sort. Unstable, O(N log N) time average and worst case, O(1) space, large constant term in time complexity.

T[0] heapSort(alias compFun, T...) (
  T data
)
if (T.length != 0);