Added the ability to remove orphaned module shared pointers from a ModuleList.
This is helping us track down some extra references to ModuleSP objects that
are causing things to get kept around for too long. 

Added a module pointer accessor to target and change a lot of code to use 
it where it would be more efficient.

"taret delete" can now specify "--clean=1" which will cleanup the global module
list for any orphaned module in the shared module cache which can save memory
and also help track down module reference leaks like we have now.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137294 91177308-0d34-0410-b5e6-96231b3b80d8
20 files changed