Add optimized QuickSort for primitive types.