zstd requires a stable sort.
zstd requires a stable sort.

On OpenBSD qsort() is not guaranteed to be stable, their mergesort() is.
This fixes issue #1088. All the hard work has been done by @terrelln.

Cyan4973/zstd,Cyan4973/zstd,Cyan4973/zstd,Cyan4973/zstd,Cyan4973/zstd