21fad7163d
MSP-9653 Calling `ActiveRecord::Base.establish_connection`, followed by `ActiveRecord::Base.connected?` returns false unless some other code requires a connection to be checked out first. The correct way to check if the spec passed to `ActiveRecord::Base.establish_connection` is to checkout a connection and then ask if it is active. `Msf::DBManager#connection_established?` does the checkout, active check and checkin, and should be used in place of `ActiveRecord::Base.connected?` and `ActiveRecord::Base.connection_pool.connected?`. `Msf::DBManager#active` should still be used as it also checks for adapter/driver usability and that migrations have run.