Fix #48: Update cursor occulusion buffer on each frame to avoid glitch.
Fix: Initialize stock correctly such that it is recognized as an inventory building.
building: Add BUILDING_HAS_INVENTORY() macro.

Returns true for castles, and stocks that are complete and ready.
building: Convert packed stock field into struct.

As a side effect this fixes #53 by avoiding weird overflow errors.
building: Improve building checks through macros.

Add BUILDING_HAS_SERF() macro.
Use BUILDING_IS_BURNING() and BUILDING_IS_DONE() in more places.
building: Add macros for access to three more bits.

Add BUILDING_PLAYING_SFX() macro.
Add BUILDING_SERF_REQUESTED() macro.
Add BUILDING_SERF_REQUEST_FAIL() macro.
building: Add BUILDING_STATE() macro.
flag: Add and use FLAG_HAS_BUILDING() macro to guard access to building pointer.
flag: Add macros FLAG_PATHS() and FLAG_HAS_PATH().
building: Add comments describing access macros.
flag: Add accessor macros for flag struct fields.

Add macros FLAG_LAND_PATHS(), FLAG_IS_WATER_PATH(), FLAG_HAS_RESOURCES().
Add macros to check whether path has transporter: FLAG_TRANSPORTERS() and FLAG_HAS_TRANSPORTER().
Add macros FLAG_SERF_REQUEST_FAIL(), FLAG_SERF_REQUESTED().
Add macros for accessing transporter count: FLAG_TRANSPORTER_COUNT() and FLAG_LENGTH_CATEGORY().
Add macros for scheduled resources: FLAG_SCHEDULED_SLOT(), FLAG_IS_SCHEDULED().
Add macro FLAG_OTHER_END_DIR().
Add inventory related access macros: FLAG_HAS_INVENTORY(), FLAG_ACCEPTS_SERFS(), and FLAG_ACCEPTS_RESOURCES().
Add comments documenting flag accessor macros.
savegame: Remove incorrect TODO comment.
building: Move stock routing priorities to building struct.

Store the stock routing priority in building instead of flag, and store the requested resource type in building as well. This allows cleaner code for requesting resources and routing these correctly. It was necessary to add a pseudo resource type representing any food type, since this is the way food is requested by the mines. A RESOURCE_GROUP_FOOD was added to resource_type_t.
player: Add PLAYER_HAS_CASTLE() macro.
player: Add missing case in player_update_interface().
player: Add enum map_cursor_type_t for result of get_map_cursor_type().
Remove incomplete feature where demolished building could be replaced after burning.
Restructure code for construction of buildings and flags.

Move most of the code that is not associated with user interface to game.c. This splits off most the functions player_build_flag() and build_building() into game_build_flag() and game_build_building() respectively.
Allow removal of flags on roads (fixes #29).
player: Add macros to access basic player_sett_t flags.

Add macros PLAYER_IS_ACTIVE(), PLAYER_IS_AI() and PLAYER_HAS_MESSAGE().
Add knight management related macros PLAYER_SEND_STRONGEST(), PLAYER_CYCLING_KNIGHTS(), PLAYER_REDUCED_KNIGHT_LEVEL(), PLAYER_CYCLING_SECOND().
player: Add macros to access building permissions and spawn permission.

Add macros PLAYER_ALLOW_FLAG(), PLAYER_ALLOW_MILITARY() and PLAYER_CAN_SPAWN().