A stack of contextualElements for render buffers, clean omitted start tags

During a renderTree call, keep track of what the contextualElement is
and pass this to the buffer reset. This allows `element()` to have the
correct context.

Additionally, strip omitted start tags even if the child node causing
their generation is after a script tag. See the long comment in
`render_buffer`.