From me and Cristina: Fix removal of out-of-line definitions.

If we had:
struct MyClass {
  void f() {}
}
MyClass::f(){} // expected error redefinition of f.

In that case we would have tried to remove the lookup entry for the decl from
the primary decl context of the lexical decl context, which entry doesn't exist.
It is registered in the semantic decl context of the decl itself.
From Cristina and me: Fix the SubSequentDecls.C

The test #includes a header file which is expected to be reverted.
.storeState and .compareState report that header file is leftover in clang's state.
This is intentionally done, because we cannot free the FileEntry pointing to that
file, because it is referenced all over the Source- and File-Managers. Instead we
clean up the cache of the file so that whoever does a request for that file entry
it will be reread from disk.

Semantically speaking this side effect that store/compare state found must be skipped.
ROOT-5519. Use getNameAsString instead of getName.

The difference is that getName gives a ptr to the IdentifierInfo of the declaration.
In cases where the declaration has implicit name (operators, ctors, dtors) clang
doesn't store IdentifierInfo and asserts.

In the general case this can be fixed by using getNameAsString. There is a trade-off
going via temporaries and std::string copies, which in the most cases is inevitable.
Import revision 49066 from v5-34-00 patch branch: Extent/correct the detection of renamed classes.   Avoid unitialized memory read during Fill-ing (read action use not yet ready ...)

This import has been previously inadvertently omitted.

git-svn-id: http://root.cern.ch/svn/root/branches/v5-34-00-patches@49066 27541ba8-7e3a-0410-8455-c3a389f83636
(cherry picked from v5-34-00-patch commit 05e082429c67603aeff9a001079cf31e6825b462)
Fix thread safety of TGenCollectionProxy's iterator creation.

The major change is that the utility routine returned by
TVirtualCollectionProxy::GetFunctionCreateIterators
now has the prototype:

typedef void (*CreateIterators_t)(void *collection, void **begin_arena, void **end_arena, TVirtualCollectionProxy *proxy);

i.e. adding a new pointer to the virtual collection proxy so
that in the case where the routine can not hard code all
the information (for example in the case of emulated collection
proxy) it can now get the information from a the CollectionProxy
without relying on the calls to PushProxy (which we are trying
to deprecate in general as it is somewhat thread adverse).
On Mac, also look for dylibs. Fixes cling test suite.
Fix thread safety of TThread::TThread(Long_t id)

Changing fId is a common ressource (see TThread::GetThread)
and thus its update must be locked.
Add include path.
Var only used on Apple.
Implement dummy operators #mbox and #hbox to improve the compatibility between TLatex, TMathTex and TTexDump
TLatex
Treat \mbox as \hbox to improve the compatibility with TTexDump.
TMathText
clearer error messages on method failure
Remove unnecessary global variable and lock

gUtmpContents was used only as a data passing mechanism
between related routines and its content had a short lifetime.

This avoids having to put a lock in TUnixSystem::SetDisplay
and (trivially) avoid introducing a possible dead-lock with the lock
being taken as part of 'Warning'.
Reduce lock lifetime in TCollection::GarbageCollect

This avoid the potential for unnecessary nested locks
when/if the routine actually deletes the object.
Use meta-data mutex for the proxy initialization.

This avoid nesting the collection and the meta-data mutex.
gClingMutex -> gInterpreterMutex
Reduce lifetime of lock in TFile::~TFile to avoid lock nesting.

No need to hold the gROOTMutex while executing ResetGlobalVar.
Add TLIne::SetNDC