(#13929) Improve logging for very early failures
This adds a "force_flushqueue" method to the Log class.
This can be called prior to a system exit, to force
any queued log messages to be flushed. If no
logging destinations have been configured it will
attempt to create a console destination for the
queue to be flushed to.