New option autofight_caught to escape webs with tab.
Reorder checks in forget_map.

An expensive LOS check was done first, while most of the map can be rejected
on the account of it being not known in the first place, or being too close
to the player.

On a profiler run, this managed to score 10%.
Don't en-/de-capsulate coord_def over and over in set_terrain_*()

All callers, and all but one internal use, want it as a struct.
Cache whether any slimy wall exists on the level.
Fix monsters wandering next to slimy walls outside Slime.

A few vaults contain these.
Axe a bogus check for water.

But, wasn't this supposed to block fire elementals?  In any case, they don't
blunder into water, so this would be redundant even if it worked.
Slightly improve mon_can_move_to_pos().

Check local variables before calling functions, don't check things twice.

This function gets called thousands of times per turn, and is not that cheap,
so more optimizations would be nice.
Fix a crash if a monster dies because of its own ability.