Use local storage shim

This commit replaces all uses of localStorage and the firefox preferences storage with the newly created local storage shim.
localStorage is supported on mobile, so I would not worry about it. Mozilla's Xul is a very odd duck in this regard.