Require.js (WIP)

Opened so people can spy on me.  Please ignore random code snippets sitting in files they don't belong in (especially in notebook.js), I'll move them when I get to the correct file.
Any reason to change this API here from a module level global to a getter? It if would work with the old way, let's put it back so this PR changes as little as possible. Same on the one below.