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.