Integrate requirejs

I'd like to split out the Mondrian logic into its own module to make it more testable and easier to extend. This is step 1.