Better error checking for Quota exceptions

The previous code for this was really flaky, it turns out most browsers disagree on the way to expose error properties...

This PR tries to detect the error code instead (22) for the Quota Exceeded Error. Even then browsers differ, but checking is much easier. I also added tests for the other specific cases, even though the errors themselves are still mocked.