The logger_thread() had an exit path that failed to release the logmsgs
list lock.
* Make logger_thread() exit path unlock the logmsgs list lock.
* Made ast_log() not queue any messages to the logmsgs list if the
close_logger_thread flag is set.
(issue ASTERISK-19463)
Reported by: Matt Jordan
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360933 65c4cc65-6c06-0410-ace0-fbb531ad65f3