'net' module: tests and fixes

So far this updates #308 with a very basic test suite, and fixes IPv4 and/or IPv6 address detection.
Looks like test 106 (under tinytap, that is) is the "port assigned" check on line 109. By "intermittent failures on test no 106" do you mean the assertion itself fails, or do you get a crash like this after test 105?

> # server-basic
> ok 105 ok
> Error: Listen on TCP socket failed (-1)
> stack traceback:
> 	[T]:src/colony/modules/net.js:480: in function <[T]:src/colony/modules/net.js:491>

That will happen when running the tests while port 1024 are in TIME_WAIT state, which will be for 2*[MSL](http://en.wikipedia.org/wiki/Maximum_segment_lifetime) — on BSD-family like OS X this means 1 minute between test runs (4 minutes on Linux). The automatic port assignments are done in JS due to CC3K limitations, and that code assumes it is the only user of the network stack. So if you have other listeners of port 1024ff and/or run the tests back to back, you get that trouble.