Don't throw exceptions out of CRtdsAdapter::Run

Since this function is the top level of its thread, throwing an
exception from here leads to an abort (and a core dump if your
system is configured to make those). Shut down cleanly instead.

Note that it's correct for send/receive to be fatal here, as we
assume a completely reliable connection for CRtdsAdapter. In
practice this will only occur if the DGI is misconfigured or the
fpga (or pscad interface) stops listening.
rtds adapter now terminates
(cherry picked from commit 54e615fa6654189cc77c083af3920f4cf2591033)
Print a warning before CRtdsAdapter dies
Changed "LB module requested State Collection" logger level
Put a mutex around CLog::write

Loggers exist in different threads and shouldn't be allowed to write
at the same time.

Maybe fixes Issue #224 (but maybe not)
Merge pull request #230 from scj7t4/MichaelDidIt

Changed "LB module requested State Collection" logger level
Merge pull request #217 from scj7t4/rtdsbug

Don't throw exceptions out of CRtdsAdapter::Run
logger thread safety: use a lock object instead of a mutex
CRtdsAdapter: use placeholders::error in async_wait
Fix what might be a namespacing error

How did this work?
Move AdapterFactory initialization out of main

Most of this can happen in the constructor to CAdapterFactory

We'll call CAdapterFactory::Instance() from Broker::Run() to start the
devices.
Stop now blocks and removes all adapters
Stop should wait for the thread to finish

(Unless it's called from the devices thread)
Devices don't really need to stop themselves, ever

Broker will handle this now
Improve a comment
Review shutdown code in Broker and main
Merge branch 'LoggerFix' into BrokerStopsDevices
Clarify a comment
Merge branch 'PlugNPlay' of github.com:scj7t4/FREEDM into PlugNPlay
Rename m_adapter to m_adapters