minor: On teleport, signal a child agent before we send the viewer TeleportFinish in order to avoid a theoretical race condition when teleporting to a neighbour.

If we do this after TeleportFinish, then it's possible for a neighbour destination to request the source to create a child agent whilst its still treated as root.
This closes the original presence which we don't really want to do.
This is probably okay (albeit with warnings on the console) but afaics there's no reason not to move the child agent signal.
Implement chat across region borders since we can tell if avatars in neighbouring regions are in range.
At strategic points in the teleport process, if the client has simultaneously logged out then do not continue.

This aims to reduce any side effects if the process tries to complete after the client has logged back in (e.g. it was delayed due to a slow destination region response).
This introduces a new Aborting entity transfer state which signals that the teleport should be stopped but no compensating actions performed.
Take out a testing sleep I accidentally left in the teleport code from last commit 7471bc7
Following on from 476a7d3e (which wasn't enough), make chat across regions on different simulators work.

Also resolves an issue of multiple chatting if the originating simulators had more than one region and they were neighbours
Add "show borders" command to show the borders of a region.

This is relevant to mega-regions where the borders are very different to a regular region.
Also adds some method doc and other code comments.
Fix teleporting into the non-SW 256x256 corner of a megaregion, though currently with a 10 second delay before auto-reteleport to the correct location.

This now does a check for border crossing (required to trigger the teleport) immediately in SP.MakeRootAgent().
If left any later, it looks like the physics scene changes the position and stops the cross happening.
If done any earlier, nothing happens because the cross-code currently requires a PhysicsActor to be in place, thuogh it's probably not necessary for this case.
Start recording inter-region teleport attempts, aborts, cancels and failures in statistics for monitoring/debugging purposes

These are recorded as 'entitytransfer' stats as seen by the "show stats entitytransfer" console command.
BulletSim: parameterize C# HACD hull creation. Add feature of reducing max hull count for simple (non-cut prims) meshes.
BulletSim: fix possible race condition where an prim's asset can be requested quicker than the asset fetcher returns and thus falsely reporting that an asset was not fetched and defaulting the assset to a bounding box.
BulletSim: small tweaks and formatting in the parameter fetching code.
BulletSim: new algorithm for vertical attraction which uses quaternion
arithmetic to compute the shortest path between the current tilt
and vertical.
Phase 1 of implementing a transfer permission. Overwrite libOMV's PermissionMask
with our own and add export permissions as well as a new definition for "All" as meaning "all conventional permissions" rather than "all possible permissions"
Implement a pref to turn on the simulator ExportSupported feature entry.
This tells the viewer to enable the UI for export permissions.
WARNING: If your inventory store contains invalid flags data, this will result
in items becoming exportable! Don't turn this on in production until it's complete!
Make llGetLinkPrimitiveParams() and llGetPrimitiveParams() work for avatars in a linkset.

llGetPrimitiveParams() works through PRIM_LINK_TARGET
Setting via llSetLinkPrimitiveParams(), etc. not yet implemented
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
BulletSim: prevent asset fetching loop when the fetched asset fails to mesh.

Check for the case where the fetched mesh asset fails meshing (degenerate
triangles or no physical mesh). In this case, the asset is marked 'failed'
and BulletSim doesn't keep trying to fetch over-and-over trying to get a
good asset.
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Add admin_get_agents xmlrpc method.

This allows one to retrieve information about agents from a particular region (name, id, position, etc.)
Similar to output from "show users"
See http://opensimulator.org/wiki/Remoteadmin:admin_get_agents for more details
Fix problem with megaregions where teleporting into a different region which already had a child agent would stop the eq working for the agent in the new region.

This was because the calculation as to whether a new agent was needed in the receiving region did not take megaregions into account,
unlike the original calculation when the user first teleported into the region.
This meant that on teleport, entity transfer would create a new CAP but this would be ignored by the viewer and receiving region, meaning that the EQ could no longer be used.
This would prevent subsequent teleport, amongst other things.
Currently, regions up to 512m from a megaregion are considered neighbours.