Add script to run QUnit tests headless with PhantomJS

Colorization is done by wrapper `script/test` script that detects
whether output is a tty. I haven't figured how to do this from
PhantomJS runtime.
Port duplicationTest.html to QUnit
Add Travis CI setup for headless testing
Merge pull request #31 from mislav/headless-tests

Add headless testing & Travis CI support for QUnit