avoid goroutine leak when using zstd
github.com/klauspost/compress/zstd requires that Close is called before encoders/decoders are garbage-collected, otherwise it leaks goroutines. Background: klauspost/compress#264
Thanks to @ains-stripe for the fix.