WML Unit Tests

This pull request introduces a framework for WML Unit Tests.

The main idea is to create a new command line option to wesnoth, --unit, or -u, which is similar to --test except that it causes the test scenario to run as a unit test. This means:

- The scenario runs headlessly.
- Wesnoth exits on scenario finish.
- The exit code of wesnoth is 0 (success) in case of LEVEL_RESULT VICTORY or LEVEL_RESULT NONE. It returns 1 (failure) otherwise.
- When using the additional option --timeout, the exit code is 2 (timeout) after [arg] milliseconds. 
- *Unless using the additional option --noreplaycheck*, wesnoth will also try to save a replay of a successful unit test and play it to completion. If it can't load the replay, exit code is 3 (invalid replay). If there is a WML error while playing it back, exit code is 4 (errored replay).

The timer starts *before* configs are cached and loaded, which might be unfortunate. When using a script with --validcache options on all unit tests but the first, the first should probably have an extended timeout period.

In data/test/, we add macros and example unit test scenarios.

WML Macros:
- The macro RETURN ends the level, resulting in victory or failure depending on a {VARIABLE_CONDITIONAL} block passed to it.
- The macro ASSERT tests a condition, and ends the level in failure if the condition fails.
- The macro GENERIC_UNIT_TEST describes a minimalist test scenario with two human sides, and takes as arguments an id string and "contents" which appear as the body of the test scenario.

WML Unit Tests:
- empty_unit_test is a GENERIC_UNIT_TEST with no body. It should be loaded with "./wesnoth -t empty_unit_test", not -u as it does not return.
- unit_test_1 asserts that 2+2=4.
- fail_test_1 asserts that 2+2=5.
- unit_test_2 tests the FIFO property of events.
- unit_test_3 tests that units spawned at occupied locations go to the nearest available hex.

Script:
The wml_unit_tests script is an example script showing how to take the AND of many such unit tests conveniently and efficiently in a unix environment.