Sort small arrays using insertsort.

This is faster, especially for already sorted arrays.