Write a function that, given a pair of random-access iterators to define its lower and upper bounds, sorts the elements of the range using the quicksort algorithm. There should be two overloads of the sort function: one that uses operator< to compare the elements of the range and put them in ascending order, and one that uses a user-defined binary comparison function for comparing the elements.