COOPR:629 Update template APIs to support extending templates and including partials

@jwang47 Branch ready for review.
LinkedHashSet always passed here. I believe that it saves insert order as well.