Optimize template fragments

Templates with a single root node (text or element) are no longer wrapped in a fragment. Other things:

- Fragment compiler uses an array buffer now
- startTemplate/endTemplate get passed in the entire block instead of the just the child count
- The opcode rewriting seems a bit hacky but I couldn't think of any better way to do it. I'm open to suggestions.

/cc @krisselden