Unit tests

First stab at writing tests (see #87 and [comment](https://github.com/cryptocat/cryptocat/issues/87#issuecomment-15670453)).

This gives a node.js-based test setup so that we can run tests from the command-line. The makefile has been updated with a command to run tests.