move formula ai features of unit to a unit formula manager

This use of handle-body idiom saves *alot* of includes, since a
huge number of objects include unit indirectly, and make no use
of the ai formula features.
Update Xcode project
Fix new get_relative_dir code translation issue
delete duplicated set_team fcn

game_display and display versions of set_team were identical, in
header and in implementation, so we simply delete the game_display
one, as a strict refactor.
fixup segfaults in replay viewer

After this commit e4eb0a3ede83ee338994708ebd48257627b47242 the
replay viewer would segfault during prestart events. However, it
turns out that nothing in the replay viewer, or in that commit,
was directly causing the segault. Instead, the display object
was holding dangling pointers for no reason, when it could have.
been simply computing the correct value (very cheaply). We clean
up the code in the display objects to fix the segfault.
Merge branch 'master' of git://github.com/wesnoth/wesnoth
disable a unit test which was broken

This test was broken in this commit
342ff4f718d678bea50419f11ad7d9a6ad1e7d58

We need to rerun the characterization to test to get the new
correct values, or it will fail. I'm disabling in the meantime.
gui2/taddon_filter_options: Make SP/MP campaigns checkbox use Sentence case

For consistency with all other non-menu/listbox checkboxes.

pofix rule included and applied.
Use Title Case for core names since they are used in menu context
gui2/tcore_selection: Make the listbox grow vertically

This allows its top to be aligned to the dialog's top so it's not
centered vertically.
rename animated.i to animated.tpp
Merge branch 'master' of git://github.com/wesnoth/wesnoth
Coward Micro AI: add optional attack_if_trapped key

If set, the unit attacks the weakest enemy next to which it ends up at
the end of its move.
change saved_game & savefile format

we move code from playcampaign.cpp to saved_game.cpp
we also change the savefile format so that ingame savegames don't
contain [carryover_sides_start] anymore becaus all that was already
merged to both [snapshot] and replay_start.

This commit is likley to break something. If so that will be fixed in
later commits.
move more code playcampaign -> saved_game

also removes some out commented code.
small playcampaign.cpp refactor
move carryover handling out of playcampaign.cpp

this also makes a small change in the savefile format: [endlevel] ->
[end_level_data] in snapshots.

we still have the "store_carryover" function in playcampaign.cpp which does the visual message.
Note that the real carryover happens after linger mode while that message happens before linger mode this simplifies linger mode saves.
remove outcommented code
move rotate_random call playcampaign ->saved_game

this also removes some set_/remove snapshot calls, which are not needed
becasue there is no snapshot after convert_to_start_save.
make use of playsingle_controller optional