IndexedDB Refactor/Dependency removal

Removed db.js & Safari shim, rewrote cache mechanism to comply with
HTML 5 standard without bulky extra libraries.