MDL-38521 JavaScript Load YUI modules correctly

We previously loaded all YUI in a single closure. This is not recommended
and means that we do not get the full benefits of YUI sandboxing.

This change switches to the recommended method of loading modules in YUI
which means that we can begin to sandbox modules correctly and helps ensure
that we have the correct dependencies for all modules.
MDL-38521 Javascript: Add some missing dependencies on node