Move tests into Gruntfile.
Run workers in the context of a domain.

This allows us to handle uncaught exceptions using a nice-looking
stack-trace that logs to both stdout and a logfile.