vc build update
replace typedef'ed type uintmax_t by its long form unsigned long long

It seems this type is not yet available in MSVC9, only in later versions.
add and use constructor (instead of assignment)

This fixes a MSVC warning about "cannot instantiate
customcodecvt_do_conversion_writer".
make included boost headers more specific

This works around a compile problem in MSVC9.
(some conflict in those boost headers ?)
add plugins context, manager, create lua thread object

This collection of classes provides a framework whereby the engine
may provide scripting capabilities in any "context". A C++
function may declare a plugin context by providing a list of names
function objects, then may call "play_slice()" on this context to
transfer control to lua. A lua script may generate some arguments
and request to call some of these, then yield to the engine. C++
will run them until one of them signals an error, or that the
context is now invalid (using a boolean return value).

The intended semantics is that lua may only make requests
corresponding to the current context. As soon as a new context
is used (play_slice() is called again) the old context is invalid
from lua's point of view -- calling those functions is a lua
error but not undefined behavior. This should be the case even if
the old context has not been destroyed yet in C++, for instance
if a lua request resulted in a new context being created. There is
a system of locks in place to ensure that when old contexts are
invalidated, stale requests are discarded.

We also add the coroutine library to our lua base. This because
threads are run as coroutines, and writing them requires the use
of coroutine yield from the standard library.
add accessor functions to plugins contexts

This allows scripts to request more info from the engine.
add plugins bindings to titlescreen and mp lobby
move the "get_str" shim to the plugins/context header
add --plugin option at command line (to replace script eventually)

This is still rough and will need to be cleaned up later.
add "describe_plugins()" to the application lua kernel
allow to open the app lua kernel in the multiplayer lobby
fixup error reporting when loading a thread's script

Should use T_ not mState...
add some debugging output to plugins manager on channel "plugins"
change "get_str" plugin callback shim to make a temp string copy

This prevents a segfault when using "send chat message".
add some debugging output to check that plugins context is running
fixup plugins loading sequence
add error reporting to try to understand wesnoth.require error
fixups: don't construct string from NULL, avoid complicated API

In the error handling routines for compiling and running a script
at runtime, don't construct a string directly from lua_tostring,
because if it is null that is a runtime error. Instead check for
this scenario.

In intf_require, when getting the "wesnoth" global, luaW_getglobal
is unnecessary and lua_getglobal should be prefered.
minor fixup: add braces to an if statement in lua load file
bugfix: intf_require would segfault if a thread called it

The problem was that intf_require would assume use the wrong
lua_State* since it finds it using the kernel's this pointer. This
commit gives a version of "protected_call" which allows to use the
callback's lua_State*.