Html resource service change

- The resource service now returns a clone of the template rather than the template itself.
- Added support for templates defined within a "template" tag, note that the return element is a document fragment in that case.