Swap out the user prefs when running tests.

This should prevent tests that run in the specrunner window from clobbering
user-level prefs.
Merge branch 'master' into dangoor/7054-test-no-break-pref
Merge branch 'master' into dangoor/7054-test-no-break-pref
Extract the creation of the preferences system to a new module.

With this change, we'll be able to replace this new module in testing.
Uses the TestPreferencesImpl when running tests.

The SpecRunner window and the test windows it opens will use the test preferences
systems rather than the real things.
Merge pull request #7163 from adobe/dangoor/7054-test-no-break-pref

Swap out the user prefs when running tests.