Add testing framework

This PR sets up Karma in the project.

To run the tests:

```shell
$ make test
```
The `check` target also runs the tests.

(Next step is to set up Travis.)