Refactor setting save/load. Misc JS cleanup.

Refactored the way user settings are initialized/displayed. Removed some popup GUI references that were doing nothing in background script. Separated common JS used by both popup/background it separate file.

Corrected all those misspellings of "badge"! This will cause one user setting to fallback to default, but I doubt many people changed it anyway.