This is first part in a series that implements Cycle Collection for every mshtml object (dispex) and cleans up rest of the code based on it, which is obviously needed due to dynamic props and other extra object-specific refs.
In an effort to split it up as much as possible, since it already has quite a lot of restructuring and changes, some of the earlier patches will introduce temporary leaks or cyclic refs, but that's because we'll later handle them properly with the dispex CC. These shouldn't affect behavior, though, so it shouldn't pose problems for functionality.
Nodes are, initially, not changed much (other than to make it compatible with the dispex) to keep changes as small as possible. They still use their own CC mechanism and refcounting, which is hackish but that is solved in a follow-up MR, so it's temporary only.
Eventually, every object (including nodes) will use the dispex's vtbl to do its Cycle Collection, except for stuff like outer window (which is a special case).
In this first part, the objects that are using the node CC will have no-op dispex CC methods since they are using the node's, but this is temporary only.
v2: Now the entire first part will be split up into several MRs. This only moves destruction/unlinking of dispex into separate vtbl methods, without actually using any of the CC yet. `release_dispex` will now call the unlink and destructor, if available (it won't be optional later, but for now it is), so only those converted objects make use of it.
Most of the patches are small and typically convert one object at a time, except the first 4. More will follow up in subsequent MRs.
-- v3: mshtml: Use unlink and destructor in the vtbl for the MutationObserver mshtml: Use unlink and destructor in the vtbl for HTMLXMLHttpRequestFactory. mshtml: Use unlink and destructor in the vtbl for HTMLOptionElementFactory. mshtml: Use unlink and destructor in the vtbl for HTMLImageElementFactory. mshtml: Use unlink and destructor in the vtbl for HTMLStyleSheet. mshtml: Use unlink and destructor in the vtbl for HTMLStyleSheetsCollection. mshtml: Use unlink and destructor in the vtbl for mshtml: Use unlink and destructor in the vtbl for HTMLStyleSheetRule. mshtml: Use unlink and destructor in the vtbl for CSSStyle. mshtml: Use unlink and destructor in the vtbl for inner windows. mshtml: Use unlink and destructor in the vtbl for HTMLEventObj. mshtml: Use separate dispex destructors for different event types. mshtml: Use unlink and destructor in the vtbl for function disps. mshtml: Introduce unlink_ref helper. mshtml: Use the common HTMLElement dispex vtbl in the dispex definitions.