Oja hg fix h2

This contains a fix for a bug when Chrome inserts extra text elements after a change of focus (i.e. a button click) and leaves unwanted H2 elements in the remaining markup

See the large comment above the change code for more.

Can we compare `nodeType`s to constants, e.g. `Node.ELEMENT_NODE`, `Node.TEXT_NODE` etc? It makes it a lot more obvious what it is.