Added heapsort; the implementation of the heap could be more efficient.