[WIP] Appcache

Offline version.
Tips:
- Manage cache in Chrome: chrome://appcache-internals/
init function is synchronous so after init is called the db/localstorage MUST be  good to use. I've thought the same as you but I think we shouldn't test something that must not happen.