map2preview: handle unknown tilesets

Signed-off-by: Giel van Schijndel <me@mortis.eu>
Prevent out-of-bounds array access

GCC actually gives a warning for this.

Signed-off-by: Giel van Schijndel <me@mortis.eu>
Prevent updating autorevision.h's timestamp when its contents haven't changed

Signed-off-by: Giel van Schijndel <me@mortis.eu>
Merge branch 'build-problems' into bugfixes

Signed-off-by: Giel van Schijndel <me@mortis.eu>
stats: Actually save stats, so players aren't stuck with the pacifier forever.

Stats were only saved in multiGameShutdown(), which apparently never gets called if closing the game.
stats: Use actual number of games played when drawing medals.

Players are no longer stuck with the pacifier forever.
Allow <map>.ini files to load scripts to complement or replace rules.js,
as well as individual AIs for each player. Also allow them to restrict
the GUI similar to challenge mode, suggest defaults for some options,
rename players and set their difficulty.
stats: Prevent double-counting of wins/losses.

Fixes ticket:3855.
qtscript: Add new function hackChangeMe(player) for changing the 'me' special variable.
This is for use in campaign scripts until we get a better way of adding scripts for
individual players.
Cosmetic cleanup of level loading code.
Do not rely on the default Designated Requirements.

Also, sign the frameworks earlier.
Emit warnings on improperly / unsigned frameworks.
Update the default layout for CS-ID.xcconfig.
Fix typo in rules.js, noticed by NoQ. Closes ticket:3857
Refactor sequence display code to prepare for OpenGL ES2 porting.
Make configure fail if it doesn't find flex.

Fixes #3859.
Add another parameter to WzConfig's constructor to indicate whether it is
expecting another file, and whether it should be created if not present.
This removes a spurious warning when opening maps without <map name>.ini
Fix the mac build broken by e48052ee83a79eb4cc77c64a7e25741ae67a83b5.
Merge branch 'bugfixes'

* bugfixes:
  Make configure fail if it doesn't find flex.
  Update the default layout for CS-ID.xcconfig.
  Emit warnings on improperly / unsigned frameworks.
  Do not rely on the default Designated Requirements.
  stats: Prevent double-counting of wins/losses.
  stats: Use actual number of games played when drawing medals.
  stats: Actually save stats, so players aren't stuck with the pacifier forever.
  Prevent updating autorevision.h's timestamp when its contents haven't changed
  Prevent out-of-bounds array access
  map2preview: handle unknown tilesets

Conflicts:
	src/multiint.cpp
Fix warning. This closes ticket:3861 and ticket:3860.