sync: Refactor GetUpdates loop

This is a follow-up to r238532.  I had wanted to implement this change
with that CL, but decided it would be easier to split them up into
independent changes.

This refactoring pulls the GetUpdates looping logic out of the
StatusController.  It was implemented that way in a time when the only
way to pass state between different parts of the sync cycle was through
a shared SyncSession and its members.  Now that this is no longer the
case, we can keep the "should continue looping" logic more or less local
to the code that performs  the looping.

The change allows us to remove the updates response message proto member
out of the StatusController.  That could save us a small amount of time,
since copying protos can be somewhat expensive.  More importantly, it
reduces complexity, since we no longer need to worry about the effects
of state stored in the StatusController.  The StatusController is now
used only to collect some counts for debugging.

This has already uncovered a bug.  There was a unit test that failed to
reset its SyncSession in the same manner that it would have been reset
in a non-test scenario.  It depended on the state that was "leaked" from
one sync cycle to the next via the unreset SyncSession in order to meet
its test expectations.

BUG=278484

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239905 0039d316-1c4b-4281-b951-d872f2087c98
[chromedriver] Fix a regression: cookie domain getting prefixed with a ".".

BUG=chromedriver:507

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239906 0039d316-1c4b-4281-b951-d872f2087c98
Removed unnecessary forward declarations.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239907 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 239906
Remove temporary fix to avoid an Assert in MediaStreamDispathcerHost::PopRequest when MediaStreamDispatcherHost::DeviceOpened is called.
The way MediaStreamManager::OpenDevice has been refactored so this is hopefully solved in a better way.

BUG= 316396

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239908 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 239908