Don't crash when swapping an ally onto a shadow/spider trap.

They would trigger the trap before the player is moved into place,
potentially summoning something on top of the player's location.  See
for example:
  http://crawl.akrasiac.org/rawdata/FACE/crash-FACE-20141228-180029.txt

There is still a crash here, which is more difficult to solve.  If you
were standing on a toadstool (atop the trap) and swap with a wandering
mushroom, the mushroom will again trigger the trap before moving the
player.

Related, if you are atop a toadstool and the mushroom is on a trap,
then swapping with the mushroom triggers the trap twice: once for
the toadstool and once for you.
Don't crash when swapping mushrooms onto toadstools on traps.

Also, don't double-trigger traps when you and a toadstool swap with a
mushroom onto the trap.

These are the two cases mentioned in the previous commit.
Add some XXX-rated comments
Brace