Makes the tokenizer return errors when low-level HTML syntax is incorrect...

...and makes the parser return null if the tokenizer rejects the syntax.

This fix by itself makes #4644 no longer reproduce, although we also still want to fix the issue with later edits referring to nodes deleted by earlier edits. We might want to consider figuring out a different set of repro steps for that issue that doesn't rely on this tokenization problem, and filing it as a separate bug/unit test case.

@dangoor