stream: pipe lazy drain
Slight optimization. Don't allocate and register the drain function for fast consumers.
Related https://github.com/nodejs/node/pull/29087
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
NOTE TO SELF: After this has been merged, look into removing unnecessary onclose
.