Added Javascript unit tests

- added karma utility to run jasmine unit tests
- added Sinon library (for stubs/mocks/fakeserver)
- added a few unit tests for core and files
- added autotest-js.sh script

To run all tests: `./autotest-js.sh` (runs on Jenkins, check out the results!)
To run tests for a specific app: `./autotest-js.sh appname`
To debug tests: `karma start tests/karma.config.js --browser Firefox` then in the browser, click "Debug". Test results are in the console. Breakpoints works.