Adjust Mono EventPipe/DiagnosticServer C library to better support CoreCLR shim. (#44527)
* Adjust EventPipe/DiagnosticServer C library to support CoreCLR shim.
Adjustments done to better align with implementation of CoreCLR shim
using CoreCLR artifacts and C++ code (CoreCLR implementation done in
separate PR).
Disconnect runtime specific shim info from shared sources, all included
shim files handled through defines.
Exception safety and improved error handling, adding error checking
and error returns into shim container functions.
Walkthrough of codebase, aligning with gaps from CoreCLR + port of
sample profiler and json file serializer.
Implement core dump diagnostic command and runtime layer (needed by CoreCLR,
currently not implemented on Mono).
Implemented process env diagnostic command and runtime layer.
Implemented profiler attach diagnostic command and runtime layer (needed by
CoreCLR, currently not implemented on Mono).
Fix native EventPipe test aligning with changes.
* Fix build errors.
* Review feedback.