Converted XModule to JavaScript. Added Jasmine tests.

Part of the process for removing CoffeeScript from
edx-platform dependencies. Covering XModule with JavaScript
Jasmine unit tests.
Merge pull request #3126 from edx/valera/convert_xmodule_to_javascript

Converting XModule module to JS.