net: Improve Socket.prototype.write()

In `http` and `net` module `.write()` is very important, any speed-up is benefit.