fix warning about unreferenced variable
fix MSVC warning about data loss
fix MSVC warning about comparison signed <-> unsigned
mute an invalid MSVC warning about unreachable code
check properly if a config attribute value is not a boolean

I don't know if this commit is related to or fixes any bugs, but
there are many bugs reported about fog / shroud / mp campaigns it
seems, and these lines always looked a bit squirrely to me. Since
boolean config values can be indicated by "yes", "no", "true" or
"false", testing for the presence of "yes" / "no" only seems like
it won't work in general, even if it works oftentimes. This commit
replaces it with a test for whether the to_bool function is
selecting the default boolean value.
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