Don’t cancel MoveAdjacentTo / MoveWithinRange when target becomes invalid.

Move to the last known position instead.  Fixes #5968.
Calculate a new path (and possibly new target cell) if the original path is blocked.
Fix a typo.
Merge pull request #5977 from pchote/oi-keep-moving

Don’t cancel MoveAdjacentTo / MoveWithinRange when target becomes invalid