use Alfresco ReadWrite lock

Use **TemplateProcessorRegistry.reset** instead of TemplateProcessor.reset so that a lock is used.