Migrating extension to manifest version 2 so it still works past January...

... 2014 (when Chrome officially stops running v1 extensions)

Made relevant changes as described here: https://developer.chrome.com/extensions/tut_migration_to_manifest_v2.html

Mainly:
- a couple small manifest.json changes
- moving inline javascript out of HTML files and into external JS files
- moving inline event attachments (onclick, onload) out of HTML and into JS (addEventListener)