unix: add uv__is_closing() macro
unix: stop stream POLLOUT watcher on write error

The node.js test suite sometimes hits the assert that was added in
commit 4146805 that checks if there are connect, write or shutdown
requests pending when the user calls uv_read_stop() while the stream
is primed for writing.

The libuv user (i.e. node.js) is supposed to close the stream on error.
Because uv__stream_close() calls uv_read_stop(), it's possible that the
POLLOUT watcher is still active.