Fix debugger late attach, suspend=n. (#45834)
Runtime workaround fix for incorrect VM resume when suspend policy none is in use. Real fix is in debugger-libs, mono/debugger-libs#264 but until that lands in VS installer (and tooling has been upgraded to VS2019) this workaround will prevent the error to be propagated back to client and VM will make sure the correct suspend state is maintained.
Fix also makes sure logging done within debugger engine/agent is not directly send to stdout/stderr on platforms where there is no console (or alternative console).
This is done to prevent scenarios where stdout/stderr has been redirected to for example the debug client, but logging into the same streams as part of debugger agent implementation will trigger new messages to redirect, flooding the message queue and suspending/resuming the VM for each message. This PR makes sure it is possible to get all logging done in debugger agent/engine (not just debug logging) into an alternative log implementation on platforms needing it.
Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>