Implement non-wait co-operative termination of scripts for XEngine in addition to termination on wait.

This involves inserting opensim_reserved_CheckForCoopTermination() calls in lsl -> c# translation at any place where the script could be in a loop with no wait calls.
These places are for, while, do-while, label, user function call and manual event function call.
Call goes through to an XEngineScriptBase which extends ScriptBase.
IEngine is extended to supply necessary engine-specific parent class references and constructor parameters to Compiler.
Unfortunately, since XEngineScriptBase has to be passed WaitHandle in its constructor, older compiled scripts will fail to load with an error on the OpenSim console.
Such scripts will need to be recompiled, either by removing all *.dll files from the bin/ScriptEngines/<region-id> or by setting DeleteScriptsOnStartup = true in [XEngine] for one run.
Automatic recompilation may be implemented in a later commit.
This feature should not yet be used, default remains termination with Thread.Abort() which will work as normal once scripts are recompiled.
refactor: rename XEngineTest to more descriptive XEngineBasicTests
Add regression test TestStopOnLongForLoop()
minor: comment out Console.WriteLine debugging message in XEngine
Increase WaitForEventCompletionOnScriptStop to 120 secs to show that the co-op setting is active in its regression tests.
factor out common code in existing co-op termination regression tests
Fix bug in generating termination checks in compound statement for loop.

Add regression test for this case.
Add single and comound while loop co-op termination test
Add do-while co-op termination test

Minor changes to scripts in other tests.
Add regression test for co-op stop of an infinite jump loop

Also fixes bug in do-while test
Improves detection of failure due to invalid script in test
Sets up xengine anew for each test rather than once for the while testsuite to improve isolation between tests.
Stop listening for chat after the first 'script is running' chat is received to reduce test run time.
Add regression test for co-op termination on infinite user function call regression.

Such a script would probably run out of stack pretty quickly anyway.
Set script delay factor to 0 in co-op termination tests

This is to ensure loops aren't actually terminating from a wait on an LSL function.
This was not the case with any of the existing tests.
Add co-op termination regression test for infinite recursive manual call on event function.

Such code would normally terminate quickly with a stack overflow exception anyway.
If ScriptStopStrategy hasn't been set to co-op in [XEngine] config, then continue to generate C# that is functionality identical to historical generation

This is to eliminate disruption until co-op termination has been well-tested.
In non co-op mode, XEngine will continue to load DLLs of the existing Script class and the new XEngineScript class.
Moving to co-op mode still requires existing script DLL deletion to force recompilation, either manually or by setting DeleteScriptsOnStartup = true for one run.
This change also means that scripts which fail to initialize do not still show up as running scripts.
Improve logging by making it clearer which script is failing if an assembly fails to load.

Moves the noise co-op start/stop debug log messages to only display if xengine debug level >= 1
Logs which stop strategy is being used (abort or co-op)
Adjusts some other logging to remove not very useful stuff
Pass narrower WaitHandle rather than EventWaitHandle as co-op termination wait handle to script APIs.

APIs don't need to reference any methods on EventWaitHandle
Add information on ScriptStopStrategy to [XEngine] in OpenSimDefaults.ini and OpenSim.ini.example.  Default remains abort.

This setting controls whether scripts are stopped by aborting their threads externally (abort) or by co-operative checks from the compiled script (co-op)
co-op should be more stable but this option is experimental.
If moving from co-op to abort, existing script DLLs will need to be recompiled.
This currently can only be done manually, either by setting DeleteScriptsOnStartup = true for one run
or by deleting the script DLL* files in bin/ScriptEngines/<region-id>/
One can move from co-op back to abort without recompilation, but reverting back to co-op again will need script recompile
Merge branch 'master' into cooptermination