Keep object values in DOM and Window event handler slots and convert
primitives to null. Distinguish legacy handlers from EventListener
callbacks so non-callable handlers return undefined without looking up
handleEvent, retaining listener order and surviving object-realm retirement.
Cover callable and revoked proxies, child windows, handler object lifetime,
and special Window callbacks. Update older assertions to check object
identity separately from primitive clearing.