DRY Metasploit::Framework::Module::PathSet::*

[#50752269]

Move duplicate code from
Metasploit::Framework::Module::PathSet::{Database,Memory} to
Metasploit::Framework::Module::PathSet::Base.