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

@jwang47 Branch ready for review.
Since we have to merge several templates we have to merge all inner collections of this templates. For example if we have two templates with "defaults" for merge then we have to merge "services" set from second defaults into the first one. If set will be immutable then this operation will be no successfully.