Split IndexedDB wrapper lib into idb.js