DirectlyCast*: store and restore previous internal state

fixes spells going to waste if a timed cast from an effect happened during
the casting period (find traps, true seeing, circle of bones and similar)