Fix potential memory leaks where the functions in pref-panel-extension.js
closed over "document" and were stored an object that could persist
across the lifetime of the perfences window.
Actually, I'm not sure this was actually a memory leak, but the editors
on addons.mozilla.org asked me to fix a similar pattern for the context
menu XUL overlay.