Handle typing of html/head/body in live HTML

Addresses #4881.

* Fixed various issues with starting from an empty document
* Made it so we generate an insert if the root element is new
* On the browser side, treat an elementInsert for html/head/body specially
  and just add the id and attributes to the existing implied node

To @dangoor for review. I manually tested starting from an empty document and everything seems to be working in the basic case (including things like typing `<title>` and adding attributes to `<body>`--kind of fun seeing the browser title update as you edit the `<title>` tag :)) I didn't try to stress it out by doing unconventional edits though.

Note that this is based off of `dangoor/4736-delete-across-tags`, since some of the changes I had to make were in the `domdiff` code, and I wanted to do them against the new version.

Also, note that I don't actually check whether the root tag is `<html>` as we had discussed--it turns out that would break some of the existing unit tests, which create simple documents that don't have an `<html>` tag. I can fix that, but ran out of time today. It seems like enough of an edge case (user creating a document without an `<html>` tag wrapping it) that I think we could treat it as a low-priority bug (although I could imagine someone doing it by mistake).

Also fixes a unit test for RemoteFunctions that's broken by the `attrDel` to `attrDelete` change that was made in the original branch.