A long time ago I rewrote kern_gzio.c since it contained some really
questionable code, and I wanted to use it for kernel dumps (it had
existed solely for user process core dumps). It works ok, but now that
we're adding support for zstd dumps, it's become preferable to use a
wrapper API for different compression formats.
This change adds such an API in subr_compressor.c and reworks the user
and kernel core dump code to use it instead. I did it in a way that
minimizes the number of ifdefs needed, and I think kern_shutdown.c is
left neater than it was.
The change is still a bit of a WIP; suggestions for improvements,
especially related to naming, are welcome.