Reduce the risk of the files or sockets being closed after the end of 'main' (or more exactly before the library start being unloaded) by calling CloseFiles and ResetGlobals in the destructor of the TApplication (which is in most cases on the stack of the main function)


git-svn-id: https://root.cern.ch/svn/root/trunk@48219 27541ba8-7e3a-0410-8455-c3a389f83636
Extend (subvert!) TROOT::CloseFiles to also delete the other active user objects held in TROOT ; for example this allow the earlier deletion of outstanding TBrowsers object, allowing their destructor to use a fully functional interpreter ; this fixes <http://savannah.cern.ch/bugs/?99193>


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