Wait for scripts defined in common xmodule code to execute.

STUD-1792