use localStorage to store API responses (bug 980081)

* use localForage instead of localStorage
* add tests
* enhancement for later: move background XHR to a web worker