Move legacy map_location arithmetic to terrain_builder.cpp

This is the only place where it is now used, so we move it out
of the map_location.?pp files and into the private space of
terrain_builder.cpp
Merge branch 'master' of git://github.com/wesnoth/wesnoth
Only blit neutral surfaces.

On the Mac loaded images are not in the neutral format causing rendering
glitches when using blit_surface using these images. Test and when
needed convert the image before using it.

Fixes bug #22045.
add setter for team.fight_on_without_leader

to be able to set this value from lua.
expose side.lost and fight_on_without_leader to lua
add 3-way tests for map_location, like associativity. refactor.

Tried also to assert translation invariance of get_relative_dir,
but that doesn't seem to hold atm.
Merge branch 'master' of git://github.com/wesnoth/wesnoth
devide bad_lexical_cast from std::exception
use use_undo=false for [do_command]

...if we are already in a synced_context.

undoing usually also removes things from the replay, so we cannot undo things if the don't put things in the replay.
replace wesnoth.is_synced() with wesnoth.current.synced_state

 making it a proxy field instead of a function makes it easier to use.
 Also we now return a string so the luadev can distinuish between
 'local_choice' and 'unsynced' which might be useful because [do_command]
 cannot be used from 'local_choice'.
replace fight_on_without_leader with defeat_condition

[side] now has an attribute defeat_condition which can be "no_leader"(default), "no_units" or "never"
"no_leader" behaves liek it behaved before.
"no_units" behaves like fight_on_without_leader=yes behaved before
"never" is new and causes the side to never get defeated, this usually means the scenariodesigner has to end the scenario with [endlevel]
Use xvfb on travis

As instructed on http://docs.travis-ci.com/user/gui-and-headless-browsers/
Disable some failing tests

These tests may no longer be correct. Their author is looking into them.
add "always" defeat_condition
rename remove_from_carryover_on_leaders_loss_

to remove_from_carryover_on_defeat_
add map_location rotate functions, and tests
in debug mode, add team strings as well as names for hidden sides.

This brings the team names in line with the player names and other
behavior in mp_connect in debug mode. For instance there are other
lines like this:
https://github.com/wesnoth/wesnoth/blob/dbf3331e9a99e75ca0c16009169eebeddb9c1db1/src/multiplayer_connect_engine.cpp#L155

From inspecting the save files generated while testing this issue,
it's not clear if it could have actually caused a problem in game,
but it addresses an issue raised by SlowThinker on the bug tracker:

https://gna.org/bugs/index.php?21800

and does indeed fix a minor shortcoming of debug mode in mp connect
engine.
Merge branch 'add_map_location_rotate'
get_relative_dir may take a const & argument
fixup header to restore gcc builds