Move database.yml selection to Metasploit::Framework::Database

MSP-11153

Test the following paths in order and only return them if the path
exists:

1. MSF_DATABASE_CONFIG environment variable
2. ~/.msf4/database.yml
3. <project>/config/database.yml
rails generate cucumber:install

MSP-11153

Add cucumber-rails for testing msfconsole's loading of database.yml from
different paths.
Add aruba

MSP-11153

aruba adds steps for testing commandline applications with cucumber.
Add feature that tests --yaml is favored over others

MSP-11153
Add cucumber to test matrix

MSP-11153
Remove unnecessary realpath

MSP-11153

Causes errors on machines that don't have ~/.msf4 like travis-ci.
Remove unnecessary return

MSP-11153

Leftover from earlier design.
MSF_DATABASE_CONFIG scenario

MSP-11153
~/.msf4/database.yml scenario

MSP-11153
Remove unneeded command_line.yml

MSP-11153

Remove definition of command_line.yml in scenarios that don't use --yaml
flag.
Order database.yml definitions to match precedence

MSP-11153
Ensure a fake project database.yml is used for scenarios

MSP-11153

Ensures that cucumber still works if config/database.yml is not set and
so other location is being used to run cucumber.
Add 'the' to make steps read better

MSP-11153
Project "database.yml" scenario

MSP-11153
Add scenario for no database.yml

MSP-11153
Remove realpath call from expected user_configurations_pathname

MSP-11153

realpath is not used in the actual code anymore because it doesn't work
for non-existent paths.
Remove debugging 'puts'

MSP-11153
Restore backup database.yml when retesting after interrupt

MSP-11153

Restore the config/database.yml backed up to
config/database.yml.cucumber.bak in the db:config:restore task, which is
made a dependency of the environment rake task so that
config/database.yml is restored before Rails tries to use it in the
environment task.  This specifically, allows for rake cucumber to be
interrupted when the config/database.yml has been moved to
config/database.yml.cucumber.bak and a subsequence rake cucumber to
succeed and restore config/database.yml, but any task that depends on
environment will restore the config/database.yml.
Check for nil resource files

See #3719
Land #3723, solves #3719 msfcli crash