An in place quicksort function.