Revert "Resource leak fix."

This reverts commit 866d72c9032cc30753c7471ad68dc76efc6199cd.
Fix build bustage for commit 90e5eff
Resource leak fix.

Prevent accumulation of about:blank windows in some situations.
Re-landing patch rebased on current context handling instead of script stacks.