Use local storage shim

This commit replaces all uses of localStorage and the firefox preferences storage with the newly created local storage shim.
Will IOS be able to use the shim as it stands? If not I can break it out into a different `else if` statement and revert to directly using localStorage..