http: write() after end() emits an error.

When calling write() after end() has been called on an OutgoingMessage,
an error is emitted and the write's callback is called with an instance
of Error.

Fix #7477.
Some properties of the `Error` instance, like `Error.prototype.stack`, depends on where the `Error` instance is created.
Even if this behavior might depend on the implementation, to me it makes sense since the error happens within the `write` function, not in `nextTick`'s callback.