fs: use proper .destroy() implementation for SyncWriteStream
This PR is just a refactoring of SyncWriteStream
to use the shared implementation of .destroy()
.
This is used by stdio.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines