Fix throttling of danger function. It was only supposed to do work every
GAME_TICKS_FOR_DANGER ticks, but last call time was never saved. Patch by NoQ.
Closes ticket:4212
Stop Auto-repair from repairing unfinished structures. Patch by Kreuvf.
Closes ticket:4205.
Merge branch 'bugfixes' into 3.1