Converting XModule module to JS.

**Description**

Part of the process for removing CoffeeScript from edx-platform dependencies. Covering XModule with JavaScript Jasmine unit tests. Other PRs in this series: [2822](https://github.com/edx/edx-platform/pull/2822), [2616](https://github.com/edx/edx-platform/pull/2616).

**Reviewers**

- @ormsbee