feature/template cleanup

This PR refactors the javascript so that only the `require.js` script is loaded explicitly and everything else is loaded via `require()` calls. I put the `requirejs.config()` in a template so that we can pass in the `STATIC_URL` value and potentially other parameters, depending on whether we want it to use local libraries or CDNs. I added a simple debug flag that causes a timestamp to be added to each script so that they aren't cached.