[Scripts] Fix a Shebang in mono-test-install for freeBSD
Fixed inconsistency in XmlSchemaValidatingReader between Mono and MS.NET
[mdoc] Switched from swallowing error to guarded execution

Improves a60ff0fd1e181cfde5b862cc491c682c11b9660a

Tests for file existence and outputs diagnostic rather than treating it as a local recoverable exception.

Leaving the question of general mdoc error-reporting for another day.
Revert "Set tls->context.valid to FALSE if a thread is suspended in native code. Fixes #1540."

This reverts commit 5ddbe31ee5c42f5e379cb077e3473667791bc15a.

Revert this as its incorrect, and causes a regression (#14058).
Fix the profiler tests.
Disable a profiler test which fails on osx.
[runtime] Fix a regression introduced by 55039913729e26c839e45ff05f17de1f2aa1c751. Use __builtin_popcountl () on 64 bit machines.
Merge pull request #754 from blackfusion/master

[Scripts] Fix a Shebang in mono-test-install for freeBSD
Merge pull request #756 from akoeplinger/fix-xmlreader

Fixing inconsistency in XmlSchemaValidatingReader between Mono and MS.NET
[sgen] Don't stack overflow when there are too many binary protocol buffers.

Binary protocol buffers are linearly linked from newest to oldest, but need to be
written out from oldest to newest.  This was sloppily implemented with a recursive
call, which caused a stack overflow when there were too many buffers.  We now
allocate an array and store pointers to all the buffers in it, then iterate over it in
reverse.
[runtime]Provide a consistent view of registered threads during suspend operations.

We previously failed to provide a consistent view of the registered threads set. This
would should up in the following ways:

-New threads would join in between two FOREACH_THREAD passes. The recently joined threads
lead to broken invariants that one loop carried to the other.

-Existing threads would leave during a FOREACH_THREAD. The now defunct threads lead
to code waiting them to ack back and deadlock in the process.

-It was possible to witness an in-progress cleanup. This would show up by
mono_thread_info_current returning null when it should not.

To amend this we provide a a consistent view of all registered threads once the global
suspend lock is acquired. This is done by acquiring that lock when registering/unregistering.

This allows us to remove some of the work-around in the sgen thread registration
code and avoid taking the GC lock.
[sgen]We no longer need joined_stw as new threads can't join once the suspend lock has been acquired.

Since no new thread can join until the collection is over, FOREACH_THREAD won't miss any thread.
[sgen] Force inlining of some perf-critical functions.
[runtime]Add more fast variants of the mono_array functions as those shown up in profiling.
[runtime] Small optimizations and cleanup in ves_icall_System_Array_FastCopy.
[io-layer] Fix a warning.
[sgen]Remove doing_handshake field since the race condition it fixes is now handled by mono-threads.
[runtime]Properly set mono-thread state as when starting/running/shutting down/dead.
[sgen] Kill SgenThreadInfo::thread_is_dying in favor of the thread-info state information.
Add a sgen test for threads joining/leaving at random places.