A few updates to the IO library:

- Fixed debug build (several instances of the dbgprints were missing a level)
- Fixed a bug in accept where the ivar was being set before the fd was set by
  the accept callback
- pass "return" values using the ivars
- reduce the size of the rwbuf by using a single event structure for raed and
  write events.