[merp] Introduce a new 'dump mode' that allows different signal behavior when dumping (#17537)
* dump_native_stacktrace should always register the sigterm handler.
Cherry picked from the https://github.com/mono/mono/pull/17310
* [merp] Introduce a new 'dump mode' that allows different signal behavior when dumping
The primary reason for this is gaining the ability to interpret SIGTERM properly as a crashing signal when outside of 'dump mode', and as a utility signal during the 'thread summarizer' dumping process.