IndexedDB support: Make fail() output clearer if request is still pending

If the `fail()` event listener is triggered due to an unexpected event, it peeks at `e.target.error` to see if that value would be a good thing to report. But if `e.target` is a request and the request's `readyState` is `'pending'`, accessing `.error` will throw, making `fail()` give unhelpful output.

So check `e.target.readyState` before accessing `e.target.error`