[Idle time spell checker] Correct position passed from undo stack

Idle time spell checker fetches positions to check from undo stack, but
the positions can be invalid since undo stack can store stale information.

This patch corrects the position before calculating the checking range,
so that we don't pass an invalid position to TextIterator, and hence,
fixes the crash.

BUG=715107

Review-Url: https://codereview.chromium.org/2845863002
Cr-Commit-Position: refs/heads/master@{#467596}
1 file changed