Bug 865023 - Introduce a prefs cache and listener utility. r=yzen