Allow PipeChannel to perform custom cleanup to drop references to fds.
Motivation:
Currently PipeChannel doesn't properly deregister from the selector during half-closes.
This means that some backend implementations will keep a reference on the kernel side
which means that the POLLHUP will not be delivered for the read end of a pipe in
e.g. NIOTests.StreamChannelTest/testHalfCloseOwnOutput - this has the test failing
in #1761 / #1788.
Modification:
Add a generic cleanup hook to allow PipeChannel
to properly deregister.
Result:
The final reference to the fd is dropped resulting in a POLLHUP being delivered
as needed - making NIOTests.StreamChannelTest/testHalfCloseOwnOutput to pass
for io_uring.