Add basic support for templates hierarchies. No fields propagation, just...

... BaseIDs and Template.InheritsFrom()