Changed the PreferencesHelper.js to take a db as a parameter so that it can be used for either the project db or the app db.  Made it so that the "switched_project" key value pair is store in the app dbs preference table instead of the project dbs preference table. That way it doesn't matter which project db is loaded while setting that k/v pair, old or new.