Modified from #561. It has gone through a lot of changes, including:
* It now relies mainly on arguments instead of datastore options.
This is because when an user uses datadatore options, the rc
script cannot really start automatically without some config
in advance, which is a hassle.
* We no longer have to manually connect to a database before being
able to use the rc script. It can automtaically connect to it
if the necessary arguments are supplied (user/pass/workspace)
* Better error handling
* Actually exits msfconsole when something fails or not ready
* The older script does not select a payload. This one will
automatically select one based on compatible payloads.
* Instead of manually specifying an "identifier" for reference
matching, this is now automatic.
* Lots of cleanup
* Update help_me