Remove opcode rewrites in favor of tracking a solo root state

These changes remove the opcode rewrites for root elements and `shareParent` `popParent` `consumeParent` steps. Instead, they determine if the element is a root element in the template visitor and pass that state as an argument to the opcode calls.