[Pepper] Refine append mode write handling on FileIOResource

 * Count written amount in append mode separately.
 * Make the values robust to multiple job.

BUG=334171

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246273 0039d316-1c4b-4281-b951-d872f2087c98
[GCM] Plumb mock keychain status to gcm store impl

The UseMockKeychain call must be done from within the same library
as the encryptor is used. To get around this we pass the mock
status as a parameter at construction time.

BUG=284553

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

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