Fix the stackoverflow test output checks (#35914)
* Fix the stackoverflow test output checks
The System.Threading.ThreadHelper.ThreadStart can tail call the
System.Threading.ExecutionContext.RunInternal (and some other methods in
the runtime as well) and thus it would not be visible on the stack
trace. So the fix is to not to look at the System.Threading.ThreadHelper.ThreadStart
in the stack trace and use a method in the test itself instead. Since
the test is compiled with optimizations disabled, JIT should not do any
"interesting" things.
* Add NoInlining attribute and do a little unification