Failing spec for Msf::Framework.new threads

MSP-11605

`Msf::Framework.new` creates 8 threads (change from 1 thread to 9 threads), but
it shouldn't create any threads.
Merge branch 'feature/MSP-11147/thread-leak-detection' into feature/MSP-11605/lazy-thread-creation

MSP-11605
Use MonitorMixing in Msf::Framework

MSP-11605

To get access to `#synchronize` for thread-safe lazy initialization.
Thread-safe lazy Msf::Framework#threads

MSP-11605

Switch Msf::Framework#threads to a custom method that uses `||=` to
lazily initialize the `Msf::ThreadManager` inside a `synchronize` block
to make it thread safe.
Thread-safe lazy Msf::Framework#sessions

MSP-11605

Switch `Msf::Framework#sessions` from being set in `#initialize` to a
custom method that uses `||=` to lazily initialize the
`Msf::SessionManager` inside a `synchronize` block to make it thread
safe.
Store Msf::Framework#initialize options

MSP-11605

Store options `Hash` passed to `Msf::Framework#new` in `#options` so
that lazily initialized children, such as DBManager, have access to
those options.
Thread-safe lazy Msf::Framework#db

MSP-11605

Switch `Msf:Framework#db` from being set in `#initialize` to a custom
method that uses `||=` to lazily initialize the `Msf::DBManager` inside
a `synchronize` block to make it thread safe.
Wrap Msf::Framework#threads in Metasploit::Framework::ThreadFactoryProvider

MSP-11605

`Rex::ThreadFactory.provider` needs to be set in
`Msf::Framework#initialize`, but setting it directly to
`Msf::Framework#threads` eliminates the laziness of
`Msf::Framework#threads`.  In order keep `framework.threads` lazy,
`framework` is wrapped in a
`Metasploit::Framework::ThreadFactoryProvider`, which responds to
`spawn`, which is needed by `Rex::ThreadFactory`, by calling
`framework.threads.spawn`, which lazily initialized `framework.threads`
when the first thread needs to be spawned.
Msf::Framework#threads?

MSP-11605

`Msf::Framework#threads?` returns whether `Msf::Framework#threads` was
ever initialized.  If `Msf::Framework#threads?` is true, then threads
need to be cleaned up, while if it is false then no threads need to be
cleaned up from the current framework.
Fail if 'Msf::Framework#threads cleaner' is unnecessary

MSP-11605

The 'Msf::Framework#threads cleaner' shared context fails with a
RuntimeError if `framework.threads?` is false, which would indicate that
cleaning is unnecessary.  This change stops 'Msf::Framework#threads
cleaner' from accessing `framework.threads`, which would create threads
only to immediately clean them up.
Remove unnecessary thread cleaning from Msf::Framework spec

MSP-11605
Remove thread cleaner from Msf::Simple::Framework shared context

MSP-11605

The `framework` from 'Msf::Simple::Framework' shared context is not
guaranteed to make threads with `framework.threads` anymore, so the
cleaner shouldn't allows be present in 'Msf::Simple::Framework'.
Merge branch 'chore/MSP-11615/update-db-schema' into chore/MSP-11614/remove-msf-db-manager-sink

MSP-11614
Remove Msf::DBManager::Sink

MSP-11614

`Msf::DBManager::Sink` contains code for a `sink` that is a meant to
serialize database events, but it's unneeded because all database events
go directly through ActiveRecord, which handles threading.
Remove Msf::TaskManager

MSP-11614

`Msf::TaskManager` was only used for `Msf::DBManager#sink`, which was
removed because it was unused, so `Msf::TaskManager` can also be
removed.
Merge branch 'master' into feature/MSP-11605/lazy-thread-creation

MSP-11605
Merge branch 'chore/MSP-11614/remove-msf-db-manager-sink' into feature/MSP-11605/lazy-thread-creation

MSP-11605

Conflicts:
	spec/lib/msf/core/task_manager_spec.rb
Remove unnecessary thread cleaning from Msfcli spec

MSP-11605
Merge branch 'master' into feature/MSP-11605/lazy-thread-creation

MSP-11605
Merge branch 'master' into feature/MSP-11605/lazy-thread-creation

MSP-11605