Rubymine linkable backtrace for thread errors

[#56005352]

The YAML format I was using was not being parsed by Rubymine into
code location links, so it wasn't terribly useful for fast debugging of
module errors.
Improved DBManager API

[#56005352]

Instead of having to check if the database is active, and then use
 ActiveRecord::Base.connection_pool.with_connection, expose
 Msf::DBManager.with_connection, which will only run the given
 block if the Msf::DBManager#connected? (which replaces
  Msf::DBManager#active) is true and the block will be called inside
  an ActiveRecord::Base.connection_pool.with_connection block, so
  methods on DBManager only need to call `with_connection`.
  Msf::DBManager#with_connection itself, defers to Msf:DBManager#connection,
  which takes two options, :with and :without, which should be given
  Procs, each Proc is called either when connected? is true or false,
  respectively.

  I have tried to find all the locations using the old active API and
  replace it with the new call, but I have not speced all usages as it
  was far too many call sites to spec during the module cache
  construction finalization.  I have specs Msf::DBManager's new API
  at minimum.
Add missing info argument to module #initializes

[#56005352]

There were numerous modules that did not take an argument to
#initialize, so I could not pass the framework instance for the new
module cache construction (The framework was previously a class
attribute).  This also ensures that I can validate all the modules
when constructing the cache as it ensures that Metasploit::Model:Base#initialize
can set #framework.
msfconsole boot

[#56005352]

Defer to database to get count of different module types in module sets
to allow the module type count banner on msfconsole boot.
Single Payload Module::Class

[#56005352]

For Msf::Payloads with a single module ancestor that is a single
payload, generate the same Msf::Payload subclass as Msf::PayloadSet used
to and store the metadata to and Mdm::Module::Class in the database.
The beginnings of the process and naming for staged payload classes is
also in this commit as it helped find the common code between
non-payloads, single payloads and staged payloads.