ModuleCache::Get used to return a new ModuleSP instance for the same module spec that may lead to multiple loaded modules for the same shared library.
This CL addresses this issue by storing weak Module pointers within map<UUID, weak_ptr<Module>> - if ModuleCache::Get finds already created module by UUID and it's not null then an existing module instance will be returned.
I'm planning to use this change in future to enforce LRU policy on cache - with map of loaded modules at hand, it will be easy to detect in-use modules.
Use lldb::ModuleWP instead of std::weak_ptr<Module>.