Save to HistoryItem when scroll, scale or form state changes.

Prior to https://src.chromium.org/viewvc/blink?revision=166428&view=revision
scroll, scale and form state was lazily serialized at the moment of
sending up the NavigationEntry message to the browser.  However, this
read-time mutation sometimes inappropriately clobbered the scroll offset
so it was deleted in the above patch.  But it's important to frequently
reserialize this state to defend against unexpected process deaths.

This patch brings a more principled approach to history save/restore:
- scroll save now happens immediately whenever one of the inputs changes.
- for scroll restore, we now attempt to do it every contents size
  change, which is similar to the policy that's proven optimal for page
  scale initialization.  This should improve usability by converging to
  the scroll position more quickly (instead of waiting until the
  progress spinner completes).
- for form fields specifically, I brought back the previous behavior of
  serializing on currentHistoryItem() calls (but added a "dirty" flag to
  do it only when needed).  This was a batching optimization dating from
  2009 (https://bugs.webkit.org/show_bug.cgi?id=31276), I'm guessing to
  avoid O(n) cost per letter when typing into huge textboxes.

NOTRY=true
BUG=344072

Review URL: https://codereview.chromium.org/172893007

git-svn-id: svn://svn.chromium.org/blink/trunk@168333 bbb929c8-8fbe-4397-9dbb-9b2b20218538