Extract some common code
Rename active_page to menu_page

This is in preparation for some JS changes where the "set click handler"
block will check to see if they are on the appropriate page before
attaching any handlers. That in turn is because with bundled JS, the
set-click-handler blocks will be present on other pages.
Include all JS on every page

This doesn't make a lot of sense by itself but is a prelude to
bundling/minifying js
Bundle/minify css and js