Rewrote test in mocha+chai+sinon using karma

Cut test size by 40% Check out README for setup intructions.
Use Content-Type: application/json on POST
Version bump to 0.4.0
Bugfix, fallback message handler was called twice when JSON parsing of message failed.
js-test-driver setup with mocha+chai+sinon

Choose between Karma and JsTestDriver as runner.
One test mysteriously failes on JsTestRunner and is skipped for now.
Making tests work in older iceweasel and firefox, and following coding standards.
Merge pull request #18 from Textalk/dev-karma-testing

Adding karma as possible test driver, rewriting tests in mocha+chai+sinon.