Fixing the template equality code

Templates can be declared multiple times and defined once - C++ allows this. It seems that the different declarations are considered as "different" things in the AST, and when calling just .Equals() method, it returns false even if the declarations declare actually the same thing. Implementing Equals() that tests the names and namespaces should fix this.