Miscelaneous fixes that came out of the unit tests

TODO: libuv still has issues.  Do we really need a close callback?