Fix scrolling back and forth on copy/paste in Firefox

Both on copy and on paste, Firefox would sometimes scroll the
document and scroll it back. On paste, it seemed to happen most reliably
when pasting into a slug.

Fix by restoring the scroll position immediately each time the focus
changes, as opposed to restoring it only after the last focus change
while yielding in between focus changes.

Change-Id: Ia592d0e8399b8896ffc0e18115e470d3ce91128f
Merge "Fix scrolling back and forth on copy/paste in Firefox"