Better error handling for failed indexedDB.open

when database connection fails, all requests fail from then on
Fix accidental deletion of mongoDB style queries
Merge pull request #65 from zawaideh/patch-3

Better error handling for failed indexedDB.open