Add unit tests

Introduce unit tests for creating a socket and i/o.
The unit tests should be run in a chrome packaged app.
before running the packaged app, run ./test.sh, which will
open a tcp echo server and browserify net-test.js