Bug 1029632 - prevent leaks through adding pref cache, r=bz, a=sylvestre

--HG--
extra : transplant_source : S%F7%3B%DFQ%24%1CJ%BBjit%F8%FEQ%B4%98%8E%95%99