switch to using requirejs for dependencies

Currently, the dependencies between the modules are managed in an ad-hoc, load-order dependent way.  By using RequireJS (http://requirejs.org/), we can explicitly declare our dependencies.  This can speed up loading, and in the future, allow building optimized versions of the CSS and JS.