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

@jwang47 Branch ready for review.
For merging purposes. We have to replace leaseDuration at the final merging process.