Sorting

Putting elements in order so everything else gets cheap: binary search, duplicate checks, and merges all lean on sorted input.