Add queue_log_realtime_use_gmt option to logger.conf

Add an option that lets you specify that the timestamps going into the realtime
queue log should be in GMT instead of local time.

Review: https://reviewboard.asterisk.org/r/2287/



git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@380209 f38db490-d61c-443f-a65b-d21fe96a405b
Change cleanup ordering in filestream destructor.

This patch came about due to a problem observed where wav files had an
empty header.  The header is supposed to be updated in wav_close().  It
turns out that this was broken when the cache_record_files option from
asterisk.conf was enabled.  The cleanup code was moving the file to its
final destination *before* running the close() method of the file
destructor, so the header didn't get updated.

Another problem here is that the move was being done before actually
closing the FILE *.

Finally, the last bug fixed here is that I noticed that wav_close()
checks for stream->filename to be non-NULL.  In the previous cleanup
order, it's checking a pointer to freed memory.  This doesn't actually
cause anything to break, but it's treading on dangerous waters.  Now the
free() of stream->filename is happening after the format module's
close() method gets called, so it's safer.

Review: https://reviewboard.asterisk.org/r/2286/
........

Merged revisions 380210 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 380211 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@380212 f38db490-d61c-443f-a65b-d21fe96a405b