Fix #3327 by using "closed" property for payloads of script tags. Also instrument all empty tags, not just img and input tags. So a bunch of unit tests are updated to reflect those changes.