Fix race condition in WebConnectionStream

See https://bugzilla.xamarin.com/show_bug.cgi?id=1553
[monodoc] Fix ecma traversal with unattached tree.

Previously the code expected to stop at upper level node using the fact that their element starts with `root:/'. This element is attributed by RootNode when loading a complete tree. However tool like mdoc also loads tree unattached which doesn't create a standard `root:/` top-level root node hence causing the issue.
[monodoc] Ditto for fetching type node parents of subnodes.
Detach the current thread as soon as possible when mono_gc_pthread_exit is called.

	* sgen-gc.c (mono_gc_pthread_exit): Given the current thread is doomed, explicitly
	detach before calling pthread_exit and thus reducing the chance of TLS cleanup issues.
Kill unused func mono_threads_is_shutting_down.
Don't set shutting_down here as it is now done much earlier in the shutdown sequence.
Move mono_runtime_set_shutting_down and mono_runtime_is_shutting_down to runtime.c
Rework the shutdown sequence so two initiations don't race each other.

	This fixes a race condition where two threads could perform runtime shutdown
	at the same time and either crash or hang. Now each initiation checks if they
	won and take the proper action in such case.

	A recurring problem was with the debugger, that would hang on shutdown if the
	main thread started shutdown earlier. In this case the agent thread would
	call into mono_threads_set_shutting_down, which in turn would do an ExitThread
	since shutdown was in progress.

	The agent thread would exit without signaling that it did complete, causing
	the main thread to block waiting for it to do so.

	* runtime.c (mono_runtime_shutdown): Rename it to mono_runtime_try_shutdown
	and move threadpool cleanup to here. Some cleanup of the rest of the sequence
	still left to do.

	* icall.c (Environment.Exit): If we fail to start shutdown, just exit
	the thread as someone else will finish the job. We can't suspend because if
	this is called by regular shutdown we would be resumed and return to user code.

	An alternative would be to detach and then suspend. Not sure on the merits.

	* threads.c (mono_thread_manage): If we fail to start shutdown, suspend
	as this is what the winner initiator wants us to do as it must be for
	forced exit.

	* debugger-agent.c (vm_commands): If we fail to start shutdown, return
	from the function and let the agent thread finish and clean up.

	* debugger-agent.c (debugger_thread): VM_EXIT commands now can return
	if shutdown was externaly initiated and in such case we should break
	the main loop and let the agent thread finish.
[mdoc] Pass the right HelpSource as a hint to the renderer to avoid generating system-provided doc.
Keep hoisted this when lambda parent is async lambda. Fixes #12549
Correct encoding transformation flags for type arguments arrays without dynamic element. Fixes #12572
Check class level type parameters used in explicit delegate parameters conversion. Fixes #12568
[monodoc] Remove .config file when cleaning
[monodoc] Use CLEAN_FILES rather than overriding clean-local
[monodoc] Cache assembly loaded with MonoImpInfo. Patch by Aaron Oneal.
Fix a regression introduced by 6285a057a248e65301def835dfc5971e6df29a39: Use the proper value to calculate whenever to do a near call on amd64. Fixes #12541.
[Caching] Adds some checks for overflow and valid bounds on heap indexes.
Merge pull request #655 from zgramana/master

Adds MemoryCacheEntryPriorityQueue heap index checks
Rename the JIT test classes so they can be run on MT too.
Run more runtime tests on wrench.