Possibly fix a CHILLING_BREATH crash

And do some misc cleanup.

(The actual change is comparing newpos to ray_copy.pos(), rather
than oldpos (the position of the ray at the start of the function
call); those two were identical before 9c4167e0bf42, but since
knockback can travel more than two tiles now, they diverge after
the first loop iteration.

I'm still not entirely clear why the ray could fail to move, but
we actually check for that now, which seems good?)