TemplatesRelation is now NodeGroup-like object.

* model extended;
* storage layer updated;
* tests fixed.

Change-Id: I94be8da85e35ee5db876bc0614ee3de87e42bb8f
Merge "TemplatesRelation is now NodeGroup-like object."