Replace typedef with standard header

This fixes the redefinition of off_t when including both system headers
and rtmp.h
Move LogUpdateCallback to a more appropriate location
Remove unnecessary new invocation
Add XT helper for closing event handles
Add global RAII helpers for events, mutexes, and threads

Also remove a conflicting typedef for int8_t from nvEncodeAPI.h
Fix potential ambiguity between XT locale and std::locale in Str()
Remove local RAII helpers from GraphicsSystem and XT
Remove bare pointer with ownership semantic in async shader compilation system

Also moved the async shader compilation thread function into a lambda
Fix AAC mono output

The entire mono situation is my fault.  I did test it and it seemed
like it was working at first when I got the pull request so I said "hey
okay looks good."  Unfortunately I was mistaken, so I'm fixing the code
myself.

AAC was taking in stereo audio and was not calculating the timestamps
correctly.  Internally OBS still gets data in the form of stereo, so
because this is OBS1 I'm just going to put in this workaround code that
downmixes stereo to mono in to the AAC encoder buffer.
Change divide by 2.0f to multiply by 0.5f
Remove unintentional tabs
Check user has added sources before streaming
Disable changing the config if the current audio device isn't found

This should alleviate the impact of enabling "Use Input devices ..." in
the advanced config

Also add a log message to signify that "Use Input devices ..." is enabled
Disable uploading/analyzing of logs without logged system stats

The log file menu will now only contain log files that have at least logged
the system stats since too many people uploaded useless logs, unfortunately