(#2072) - simplify idb.js code

I tried to preserve as much of the original winningRev/isDeleted optimizations as possible while still passing the tests.

Next up I'll look at WebSQL, which is failing one of your new tests.