An attempt to consolidate some of the form handling JS

Including different JavaScript on different pages has it's advantages,
but I think that in general, it's less confusing when the same scripts
are on each page. I've created a main.js here, and I'm using require.js
to include the form code. I did this to fix the 'undefined method'
errors from jshint, and I think it will be a good way to organize
things.
Merge pull request #124 from nikolas/consolidate-tracker-js

An attempt to consolidate some of the form handling JS