zlib: destroy only when both readable and writable finished
Related to https://github.com/nodejs/node/pull/32215
A zlib stream should not be destroyed until both sides has completed. Since 'end'
can be emitted before 'finish'
.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines