Add ability to disable GUI host errors (dotnet/core-setup#6325)
By default if the host runs a GUI application, it will report errors as a popup dialog. This is very useful for normal activation, but it is when executed from automation. The popup dialog blocks the process exit indefinitely.
This change adds environment variable `DOTNET_DISABLE_GUI_ERRORS`. If it's set to `1`, then even if the application is marked as GUI, all hosting errors will be reported to `stderr` and no UI popup will occur.
Commit migrated from https://github.com/dotnet/core-setup/commit/
5f7f0e599520171508acb2b900d07ca5233a9155