Modify construction of application, configure test

* Use callback function to testing
* Add new test case to test_ajax.js
* Add new reporter to karma (the previous one was
  not too helpfull), called karma-mocha-reporter
* Update package.json, it has already contained the
  new reporter