Refactor monster abilities.

A sane implementation of edicts on these is going to need this refactor, and the code was sufficiently fragile anyway that this squashed at least one bug.  Some of these abilities should be made into pseudo-spells, though.