bugfix: fix an infinite loop in gui1 textbox when run with no gui

The infinite loop was that when the textbox has no space, we word
wrap a single character infinitely and run out of memory by
printing endlines.
allow to open the app lua kernel in the multiplayer lobby
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
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.
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*.
fix a binding for "select_game" for the plugins context
fixup multiplayer lobby plugins bindings
add "get_int" shim, similar to "get_str"
add an automatic plugins context to all gui1 dialogs
bugfix: events were being discarded before the plugins got them