Fix enemy flashing on high frequency attacks

Used player flashing as a reference and developed a foolproof method for always making sure that enemy flashing is cancelled at the appropriate time.
Merge pull request #2239 from niamu/enemy_hurt_state

Fix enemy flashing on high frequency attacks