[LiveHTML] Handle multiple tag inserts

@dangoor 

See the comments in my added commit for the fixes I made to your original work. We should definitely add more unit tests, but I thought it would be good to put this up now in case you come online (I'm going to be in a meeting for the next hour).

Note that this actually fixes typing of something like an `<img>` tag in the middle of text. (I had previously added a unit test for this that was passing before, but it didn't actually work in the browser. I'm not entirely sure why that was, but this new edit sequence actually works.)