Merge remote-tracking branch 'singu/master'
Work in progress

This work extends AIStateMachine to run multiplex() in the thread
that calls run(), cont() or set_state(). Note that all three
eventually call locked_cont(), so thats where multiplex() is called
from. Calling multiplex() means "running the state machine", as in
"calling multiplex_impl".

Currently only LLURLRequest uses this feature, and then only
for the HTTPGetResponder, and well only for the initializing,
start up and normal finish states.

A current/remaining problem is that we run into a situation where
the curl thread runs a statemachine to it's finish and kills it,
while the main thread is also 'running' it and tries to call
multiplex while the statemachine isn't running anymore.
Bug fix: remove remainder of test code
Revert "Work in progress"

This reverts commit ef35aa795420714ff5138e8068544eb18a161de4
because it contained too much wrong things that I won't be
using. I'll re-commit stuff from it after that that I do
want to keep.
Fix initialization list order.

Also fixes a Dout line and initializes mState to 0 so
that if ever set_state would be called first from
a non-main thread then it will be larger (probably
not needed currently).
Removed two unnecessary states from AICurlEasyRequestStateMachine

Removed AICurlEasyRequestStateMachine_added and
AICurlEasyRequestStateMachine_finished because the state machine is not
taking any action there anyway, and those states might be skipped all
together even, so they make no sense / shouldn't exist.
Assertion bug fix for libcwd with dc::curl on and curlio off.
Renamed AICurlThread::mWakeUpMutex --> AICurlThread::mWakeUpFlagMutex
Make AICurlThread::wakeup_thread thread-safe.
Add support for xdg-open.
Bail out instead of crash when parseTEMessage fails.
Rewrite of AIStateMachine, version 2.
Merge branch 'master' into curlthreading4

Conflicts:
	indra/aistatemachine/aistatemachine.cpp
	indra/aistatemachine/aistatemachine.h
	indra/llmessage/aicurleasyrequeststatemachine.cpp
Run HTTPGetResponder in any thread.

This fixes a bug where unref() was called when a state machine was
aborted before it reached bs_initialized. Debug code was added to detect
errors related to that.

In order to run HTTPGetResponder in any thread, I needed direct access
to LLHTTPClient::request, so I had to move that to the header file,
and therefore had to move ERequestAction from LLURLRequest to
LLHTTPClient to avoid include problems.

With this, textures are fetched with no latency: call to
LLHTTPClient::request runs all the way till the state machine is idle
(AICurlEasyRequestStateMachine_waitAdded). There is small delay till the
curl thread wakes up, which then processes the request and opens the url
etc. When the transaction is finished, it calls
AIStateMachine::advance_state(AICurlEasyRequestStateMachine_removed_after_finished)
which subsequently doesn't return until the state machine is completely
finished (bs_killed). The LLURLRequest isn't deleted yet at that point
because the AITimer of the LLURLRequest runs in the main thread: it is
aborted, but only the next time the main thread state engines run that
is deleted and the timer keeps an LLPointer to it's parent, the
LLURLRequest, so only then the LLURLRequest object is destructed. This
however has nothing to do with the texture-bandwidth loop.
Initialize mDebugRefCalled on restart.
Don't return from abort() until the current execution, if any, finished.
Bug fix in debug code.
Add CPU cycles to AIStateMachine in the crashlogger

Also removes unused Debug Setting CurlMaximumNumberOfHandles.
The maximum number of handles is limitted by
CurlMaxTotalConcurrentConnections.
Merge branch 'master' into curlthreading4
Fix crashlogger wrt AIEngine.