Use *_collision helpers for database and memory

[#50752269]

Use helpers on Mdm::Module::Path and Metasploit::Framework::Module::Path
to make database and memory path sets more similar.