Add AIStateMachine::mSMDebug

The patch is exclusively libcwd related.

Turns off output from statemachines to dc::statemachine by default.
Allows to turn on the debug output on a per statemachine basis (at
compile time).
Add AIStateMachine::yield_if_not

This can be used to switch to a specific engine.
If the state machine is not running in the passed engine,
then it performs a yield to that engine, otherwise it keeps
running. Hence, putting this at the top of a state
guarantees that it runs in that engine.

For example:

    case FrontEnd_done:
    {
      // Unlock must be called by the same thread that locked it.
      if (yield_if_not(&gStateMachineThreadEngine))
      {
        break;
      }
      // Here we are running in gStateMachineThreadEngine.
    ...
Added AICondition.

AICondition is like AIThreadSafeSimpleDC (it is derived from it),
and wraps some variable, protecting it with a builtin mutex.

While in a statemachine, one can call wait(condition) to make
the state machine go idle, and call condition.signal() to
wake it (or another) up again.

While normally a condition variable is used as follows:

condition.lock();
while (!whatwerewaitingfor)
{
  condition.wait();
}
// Here the condition is guaranteed to be true and we're
// still in the critical area of the mutex.
condition.unlock();

where the thread blocks in wait(), the statemachine actually
returns CPU to the thread (the AIEngine), so there is no
while loop involved, and our wait() doesn't even unlock
the mutex: that happens because the state machine returns:

condition_wat condition_w(condition);		// Lock condition.
if (!condition_w->whatwerewaitingfor())		// The variable(s) involved can only be accessed when condition is locked.
{
  wait(condition);				// Causes the state machine to go idle. This does not block.
  break;					// Leave scope (unlock condition) and return to the mainloop - but as idle state machine.
}
// Here the condition is guaranteed to be true and we're
// still in the critical area of the condition variable.

In this case, when condition.signal() is called, the thread
doesn't return from wait() with a locked mutex - but the
statemachine executes the same state again, and enters from
the top: locking the condition and doing the test again,
just like it would be when this was a while loop.
Merge remote-tracking branch 'singu/master'
AIStateMachine fixes.

Things (one debug code only) that don't happen currently,
but that I ran into with AIMultiGrid.
Modernize LLSelectMgr and fix leaks
LLFloaterInspect: bit of cleanup and allow sorting by creation date regardless of format
Satisfy Issue 699: Let Alt-right clicking in mouselook bring up pie menu

Also lltoolpie.cpp cleanup
Address jonhboy's Request: Round land impact instead of chopping off the decimal
Added Windows 64 support to repackage.sh
Added support for Visual Studio 2012 to develop.py and VSTool
WIP win64 support
Fix crash signature 222
Feature request by StephiDreamEvermore Doune: Implement the convenience of being able to set view offsets while modifier keys are held during scroll in third person camera (Play with camera position/angle)
WIP: native win64 support
WIP[win64]: it builds, runs. webkit disabled in cmake for now
WIP[win64]: Rebuilt jpeglib
Reduce unbearable notification span when a plugin fails to load
WIP[win64]: Rebuilt jpeglib, libpng, fixed loading of fmodex
WIP[win64]: Sync this snipped with upstream to avoid texture indexing issues on Windows 64