.to_credential now assigns a parent

##Validation steps
- [ ] launch msfconsole
- [ ] enter irb
- [ ] `core = Metasploit::Credential::Core.last`
- [ ] `cred = core.to_credential`
- [ ] `cred.parent == core` this should be true
- [ ] `cred = Metasploit::Framework::Credential.new(public: 'username', private: 'password')`
- [ ] `cred.parent.nil?` should be true
- [ ] `new_cred = cred.to_credential`
- [ ] `new_cred.parent == cred`
since we are returning the same object instead of duplicating it and returning a new one
- [ ] `cred.parent == cred`