Add utility function to clamp a vector to a maximum magnitude.
BulletSim: Add one function that all actors who act on the physical
can use to know if the object is currently active.
Code cleaning including use of Util.ClampV function.
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
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.
BulletSim: add logic to turn off pre-step actions when object goes
non-active. This turns off 'setForce', 'setTorque' and 'moveToTarget'
when the object is selected or made non-physical.
BulletSim: reduce jitter in avatar velocity when walking or flying.
OpenSimulator is VERY sensitive to changes in avatar velocity and
will send an avatar update message when velocity changes more than
0.001m/s. This significantly reduces the number of avatar update messages by
smoothing the avatar velocity returned by Bullet.
Restore previous client AO behaviour by not allowing them to remove the default animation but continue to allow scripts to do so.

This keeps the fix from http://opensimulator.org/mantis/view.php?id=6327
and fixes the behaviour regression in http://opensimulator.org/mantis/view.php?id=6483
Animations may still exhibit different behaviour if both scripts and clients are adjusting animations.
A change in the behaviour of client AO to not remove all animations may be a better long term approach.
Add "debug set set animations true|false" region console command.

Setting this logs extra information about animation add/remove, such as uuid and animation name
Unfortunately cannot be done per client yet
Fix use of scene debug commands when region is set to root or a specific region where there is more than one region on the simulator.
Mantis 6507 keys returned by llGetAgentList incorrect for llList2Key

The type of the keys returned by llGetAgentList corrected to LSL_Key
New constants for llGetObjectDetails

New constants for llGetObjectDetails OBJECT_CHARACTER_TIME,
OBJECT_ROOT, OBJECT_ATTACHED_POINT, OBJECT_PATHFINDING_TYPE,
OBJECT_PHYSICS, OBJECT_PHANTOM and OBJECT_TEMP_ON_REZ
also Pathfining constants, 3 of which are used by llGetObjectDetails
New constants for llGetObjectDetails

New constants for llGetObjectDetails OBJECT_CHARACTER_TIME,
OBJECT_ROOT, OBJECT_ATTACHED_POINT, OBJECT_PATHFINDING_TYPE,
OBJECT_PHYSICS, OBJECT_PHANTOM and OBJECT_TEMP_ON_REZ
also Pathfining constants, 3 of which are used by llGetObjectDetails
Explicitly stop PollServiceRequestManager() rather than relying on its destructor.

Hopes to address occasional shutdown failures from http://opensimulator.org/mantis/view.php?id=6503
Assign the SmartThreadPool name in the constructor

This is required because some threads are created in the constructor, so assigning the name afterwards would be too late.
Check the existing ScenePresence.ParentPart to make sure we're not trying to sit on a prim we're already sat upon, rather than looking up the part from scratch.

An adaptation of commit 055b8a2
Having both ParentID and ParentPart references now is redundant.  ParentID should probably be eliminated.
minor: adjust formatting in TESTING.txt to make headers more wiki-like
IRCBridgeModule: optional agent-alertbox for IRC enabled Regions look in OpenSimDefaults.ini / section [IRC]

http://opensimulator.org/mantis/view.php?id=6470

idea: https://github.com/ssm2017/IrcBridgeAlert
* Allow unsafe code with BulletSim
* Tweak the BulletSimN API a bit.
* Dumping BulletSimNPlugin in favor of combining the API