Updated with the initial tests moved to events.c, and new iframe tests + fixes after that (since they complicate the implementation). I've also made document.onstorage not exposed on IE9+ just like native, which basically fixes the whole problem I described before.
The tests are somewhat improved and should handle some racy corner cases on native, since the storage is not synchronous and it can have lingering entries, so we poll first until it's empty.