stream: call end(cb) callback after destroy
Don't deadlock calls to end(cb) after destroy(). This only partly fixes the problem in order to minimize breakage.
This becomes relevant in the future for e.g. deprecating fileStream.close(cb)
in favor of fileStream.end(cb)
.
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