lua: refactor to use lua 5.2 syntax for custom metatables

In lua 5.0, the preferred way to define custom metatables is to
use registry keys defined by pushing pointers as lightuserdata to
lua. (These pointers can be pointers to arbitrary constant objects,
as long as they are unique.)

In lua 5.2, the preferred way is to use constant strings as the
registry indices, and several lua API functions are introduced:
"luaL_newmetatable, luaL_setmetatable, luaL_checkudata,
luaL_testudata" which greatly simplify the operations for creating
the metatable, assigning it to a userdata, and checking if the
userdata has that type.

This commit switches over the keys associated to textdomains,
translatable strings, vconfigs, and lua gui2 dialogs to use the
new style, and simplifies some of the implementation details in
the process. For instance, luaW_toconfig no longer has to have an
optional argument to an index on the stack where the tstring
metatable is... these details are handled by the lua API instead.
ilua: eliminate the "_" holds last executed command feature

the ilua `_pretty_print` feature has the property that it sets _
to be what was printed, as an interpreter feature so that _
represents the results of the previous expression. However it
appears that this may conflict with some parts of our api, for
instance the _ is used to hold the return value of
wesnoth.textdomain in the lua implementation of [harm_unit].

Note that there is no actual bug that I have observed, I merely
anticipate that this _ feature won't be compatible with our
established gettext conventions.
lua: get rid of lua "currentscriptKey" from an old branch

This key was created in the first attempt at application scripting
but it was reappropriated to be used as the key for the
"thread table" when the present solution based on coroutines was
found. The key has been renamed and moved to its site of usage now.
add a unit test for lua get_sides return object
lua: move code related to get_sides metatable to its own file
move unit_type::alignment_description impl into .cpp file
lua: move code related to getting unit types to its own file
Merge branch 'lua'