Use the UpdatedDeclContext record for modules (which cannot be chained PCHs) by storing all global decl contexts (aka namespaces) in teh modules.
Those *must* be read indepedently of the lookup (which usually triggers reading of decls from the modules), else an existing namespace std (with a lookup map entry e.g. for "find") will not know that there are new overloads coming in from the module.
For all those module-local namespaces, find an existing namespace and tell it to clear its name map.
[A future optimization should iterate over the name map (or rather name-hash map) of the module's namespace, and invalidate only those from the AST's name map with matching name (hash).]
The global DeclContexts must be deserialized after reading of the module header: reading decls needs the complete header (e.g. the redecl map).

Simplify isSame(): thsi checks *only* whether X and Y must be the same C++ entity; *not* whether they are compatible. I.e. this is *not* a validity check; the module is assumed to be valid.
The verification will need to be moved into a separate function as it must be used in a different context (error if mismatch instead of e.g. not-attach-to-redecl if mismatch).
Remove its FIXME: there are no more cases to implement!

(This now fails in libMathCore due to a call to isSame() on reading a templated decl, which reads its cxx record decl context, which reads its template specializations, which compares the type of the currently reading templated decl - ouch.)


git-svn-id: https://root.cern.ch/svn/root/trunk@48497 27541ba8-7e3a-0410-8455-c3a389f83636