Add preparation for provider (bug 942361)

You can't mock localStorage due to property changes being denied either in FF and Webkit. Dep injection seemed like the cleanest approach as resetting property access felt far too filthy, and it only worked in FF.