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
fix bug #23113 unit-specific anims missing (tutorial delfador)

There were two bugs here:
In 6603de667b464d6f6bea04fa07dd25ac8493bc39, in unit::advance_to,
the code fragment that resets the animation set based on the new
unit type was made to run after modifications had been processed.
Since modifications may introduce new animations, this caused these
to be discarded.

In d7bf5be356d71ada4f8b657671258160095d5fe3, [animate_unit] was
broken by accidentally not including it in the lua kernel
initialization routine.
Merge branch 'master' of https://github.com/wesnoth/wesnoth
lua: move code related to getting unit types to its own file
Merge branch 'lua'
Updated codeblocks projectfile
Update Xcode project file
fixup 2486b8ba4bcef056fb523d91f4a8445b48aef685

That commit overlooked the tstring_concat_aux function in
lua_common.cpp, a helper function for tstring concatenation. This
caused lua errors when HttT was started, arising in the code to
display objectives.

This commit fixes up the tstring_concat_aux function to more
directly check the tstring type.

It also fixes luaW_totstring and luaW_toconfig so that they don't
immediately flag a type error if they fail to convert userdata to
a tstring... this was caused by inappropriately using
luaL_checkudata when luaL_testudata should be used.
cmake: Fix pot-update target breakage when bash isn't the default shell

(Default shell as in the /bin/sh executable.)

On Debian and other systems using a different Bourne-compatible shell
that doesn't support some of Bash's syntax extensions (in particular,
'&>' as a redirection operator targeting stdout+stderr), the pot-update
target is completely broken, stuffing the POTFILES.in lists for either
the last (wesnoth-utbs) or first (wesnoth-ai) textdomains with paths for
every C/C++ source file from our tree.

Shells that do not interpret &> the way Bash does consider it to be the
stdout redirection operator following an asynchronous invocation. Of
course such a thing is bound to cause weird issues like this.
Restored a subtler Shaun and Ed easter egg
DiD: combine some variable clearing
gui2/tgame_cache_options: Set busy mouse cursor during cleaning/purging

These are potentially expensive operations depending on the target
medium, the number of files that must be deleted, and the filesystem
implementation. For example, deleting 12,100 files (around 235 MiB)
takes around 0.4 seconds here.

Using the busy mouse cursor makes it look less like Wesnoth has frozen
entirely and more like there's actual work being done.
add a unit test for recall list manager object
Put split-string-at-comma code into a function
Eliminate local var from trim()