A struct io could be added twice, corrupting the ios list. Stop doing that.
More bug fixes. Not sure how to handle closing of a write descriptor that has
been closed.
Rearrange the order of some functions to better group them.
Fix bug where the write file descriptor was used to see whether we need to add to ios.

Also, break out code to dump fd_sets and remove select() exception handling
as it doesn't pertain to this code.
Looks to be working, at least for common cases.
Remove tons of debugging statements.