[Mono] Don't set thread name of main thread on Linux (#36116)
* [mono] Record MonoNativeThreadId of the main thread
We would like to know the MonoNativeThreadId (pthread_t on Linux) of the main
thread of the application. We can identify the main thread (on linux) because
it is the one for which `gettid () == getpid ()`. (`gettid()` returns a
`pid_t` which is not the same thing as a `pthread_t`, hence this roundabout way
of detecting it.)
A complication arises in embedding scenarios: the main thread is not
necessarily the one that calls `mono_jit_init` or otherwise interacts with the
runtime. Therefore we do the `gettid() == getpid ()` test at `MonoThreadInfo`
creation time when we call `register_thread`.
If the main thread never interacts with Mono, the main thread is not known to
us.
* [mono] Don't set name of main thread on Linux
Setting the name of the main thread also changes the name of the process.
Fixes https://github.com/dotnet/runtime/issues/35908
The corresponding fix for CoreCLR is https://github.com/dotnet/runtime/pull/34064
* Re-enable test from https://github.com/dotnet/runtime/pull/34064