'net' module: tests and fixes

So far this updates #308 with a very basic test suite, and fixes IPv4 and/or IPv6 address detection.
I've opened up https://github.com/tessel/firmware/pull/64 to set the inactivity timeout to be infinity. I've left keepalive as 10s. I'm fine with not doing #2 right now, we can revisit that again if needed.