test: removed tests that don't apply to polyfill
glue: set union of closure global listeners

That way, code gets the listeners that were set to currently be active,
as well as any listeners that were active when the closure was created.
Includes a pretty highly-tuned function to compute the set union.