Setup mvn test-supported JavaScript unit test environment with QUnit

In order to facilitate that, introduce utils.js that contains helper
functions without dependencies to ajax calls and ICEpush
servlets. Also write some tests for the function moved to utils.js

To run the tests, simply run

  mvn test

To debug any failures, open

  target/qunit-html/utilsTest.js.html