6-update4 - New master password verification code feature + A few bug fixes and cleanup

Added master password verification code based on @abudden's code.
Fixed bug related to long profile names in the popup(need to refactor options page still).
Changed profiles to be an array everywhere and fixed globals leaking when running QUnit.
Fixed bug where changing password while confirmation doesn't match still saves password for later use.
Refactored a few functions and changed all loops to be for loops.