tests: prefs: add test case for pref pickling

(integrated from master branch change f0a48f2 by Todd Whiteman <toddw@activestate.com>)