[IndexedDB] Refactor, fixings on update and insert result the same as websql