Wait for scripts defined in common xmodule code to execute.

STUD-1792

@cpennington @andy-armstrong What do you think of this approach? I can't reproduce the bug locally to confirm that it fixes it... When I run locally, the Promise is resolved before the JS in container.html and unit.html executes.

@singingwolfboy Adding you in case you are interested or know of a better way to dynamically add JS dependencies. Ideally, we'd like to say that "xmodule" depends on all these individual scripts being loaded and executed.
Use `===`, not `==`