Implement quicksort from vogella.com (finds pivot from middle)