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

@jwang47 Branch ready for review.
Should be `else if (template Instanceof PartialTemplate)`, and throw in the `else` - if we have a new child of `AbstractTemplate`, then we won't get unexpected behavior.