Fix creation of template fwd declarations

by mistake the template fwd declarations passed to TCling::RegisterModule
were not including the scope.
Now the enclosing namespaces are properly added.
Reach the template decl within namespaces if present

the dictionary provides to RegisterModule a series of pairs of
string-uint. A pair is the template fwd declaration and the number
of template arguments to keep.
The system needs to discover in this fwd decl the template, in order
to keep a table of template ptr - # of templ args to keep.
For this reason, scopes are important.
Reformulate interface for helper functions + perf optimisation

the optimisation was carried out in KeepNParams. We recurse only
if we need to keep the parameter.
No warning if the same key for the same lib is specified in 2 rootmaps

only if gDebug>3, print an Info.