COOPR-578: Template Extension

Base abstract template / persistence layer / base tests for partial templates.
If you will apply changes to my comment in AbstractTemplateCodec you will not need cast here