Fix SDL-related build breakages when not building the client.
Properly fix server and tty client usage of SDL.
TTY client needs pthread.
Merge branch 'gameplay/master' into gameplay/viech
SDL 1.2: fix input of non-ASCII.
SDL 1.2: fix deletion and Ctrl+key in the in-game console.
Update changelog.
Build detour & nettle only once (if needed).
Fix listing of items (un)locked.

Problem was of the form 'sprintf(buffer, "%s…", buffer, …)'.
Revert "Build detour & nettle only once (if needed)." – too soon for this.

This reverts commit 8559f173f1b8d80b5c09fb6122ba83ae7e70df75.
The cmake feature used in this commit was added in cmake 2.8.8.
Unfortunately, travis uses an older version.
Fix locale handling for input etc. on *nix.

Without this, some input, e.g. compose sequences, could be mangled.

I found that <compose> <apostrophe> <a> was causing ‘Ã¡’ to be input – this
just happens to be the result of conversion from Latin-1 to UTF-8 of ‘á’
when already represented as UTF-8.
Fail the fight task if the enemy is no longer reachable
Add a navmesh testing command
Tell the user when the navmesh name does not exist
Fix acid tube shell inner surface (culling).

This is the same problem as with human armour – could be seen through from
inside.
Don't do friendly weight damage.
Fix attribution of damage dealt by ET_FIRE entities spawned by the firebomb's submissiles.
Fix pulse rifle means of death.
Fix locale handling for input etc. on *nix.

Without this, some input, e.g. compose sequences, could be mangled.

I found that <compose> <apostrophe> <a> was causing ‘Ã¡’ to be input – this
just happens to be the result of conversion from Latin-1 to UTF-8 of ‘á’
when already represented as UTF-8.
Properly fix locale settings.

We mostly use the settings from the environment, except as follows:
* LC_CTYPE – same language/country but with UTF-8 (failing that, "C.UTF-8")
* LC_NUMERIC - "C", due to issues with printf and generated code