'net' module: tests and fixes

So far this updates #308 with a very basic test suite, and fixes IPv4 and/or IPv6 address detection.
See https://github.com/tcr/tinytap/issues/4 — on this branch currently, running `colony test/suite/net.js` directly I see 120 tests with a locally patched 'ttt' [for pass/fail, e.g. https://github.com/isaacs/tt/pull/2] but only 112 with 'tinytap'.