High-level wrapper around IndexedDB, with fallback to localStorage