Refactor lib directory structure

Moved 3rd party javascript libs together, moved css into the 3rd party libs, made a common `app.css` file, added a `require.config.coffee` config file, made a separate config file just for tests, removed some unused modals from the main template.