Print the stack trace on lua errors
Actually trim whitespace when combining lines

regex_replace does not mutate the string in place.
Improve lua stack trace display
Improve error reporting when an automation script fails to load

Cut down on the amount of redundant information displayed so that the
actual error is visible.
Fix display of automation errors on startup

The wxLogger isn't created until it's needed by the main thread, so any
errors logged on a background thread before the logger was first used on
the main thread were simply being discarded. Fix this by forcing the
creation of the logger very early in the startup process.
Fix an occasional crash when loading Automation scripts

cmd::reg and AssExportFilterChain::Register are not thread-safe, so
guard them with a mutex.
Don't try to add stack traces to non-string errors
Double the size of the Automation log window
Canonicalize Automation script file names for nicer errors
Fix line numbers for moonscript files in error messages