Push refactoring of 5-element sort code. As this is used in the pivot
choosing step of my current best quicksort, it deserves to be
benchmarked, too.