
Todo:
-- Killing an IOD should kill all events associated with it.
-- Write some rather grueling socket tests
-- Add ms pool options (debugging support, error fd, etc)
-- Add statistics gathering to nsock
-- Add Asynch DNS to Nsock
-- Add C++ Wrapper around nsock (OTOH maybe I should just use the C
   version even in C++ progs).  Yeah, that sounds like the right way
   to go.

Done:
-- Add sd accessor functions to iod
-- Insure the peer and peerport stuff are always updated.
-- Ignore EPIPE
-- Remember to up max file descriptors to 1024 or whatever
-- Change name to nsock -- Nmap Socket Library
-- Add the bodies for the msock_timer event requests
-- next_event stuff is not updated as much as it should be.
-- Add the bodies for the msock_write event requests
-- Ensure that event timeouts really work
-- Ensure that msock_loop timeouts really work.
-- msock_core:224 -- be sure to lower max_sd value
-- move tod initialization into msp new
-- msevent.c:190 (only make the change if the event is the same as is
   being deleted)
-- Change 'next' generation in iterate_through_event list to right
   before the deletion of the element.
-- Clear finished events from the results descriptor sets too.
-- PREPEND new events to the event list
-- Change event id generation to use the RIGHTMOST bits to store types
