Inconsistent `<img>` handling

Not sure whether this is caused by spec or the reference implementation, but the <img> handling is inconsistent: it depends on whether the tag is closed, self-closing, or not closed.

See this dingus demo.

This is consistent with the spec: see discussion at

But @glebm has raised a legitimate issue for discussion about whether the spec should give special treatment to void elements here:

(I’ll start a separate thread for discussion of this.)