unix: fix EVFILT_WRITE when peer close(2)s and shutdown(2)s
For the close(2) case restore reporting the event with EV_EOF set. This
fixes bug 286692.
For the shutdown(2) case restore original behavior, but leave comment that
we may want to change that. The d15792780760 was not intended to bring in
functional API changes.
Provide tests for both cases.
PR: 286692
Fixes: d15792780760ef94647af9b377b5f0a80e1826bc