Add heap sort implementation

It would be good to stop if `count == 0`, because otherwise it will underflow and you will get around `2^32` as end