Fixed Hoare quicksort to be much more efficient and implemented the median of three approach