[Sync] Refactor the PSS methods that stop syncing.

Previously, there were three methods for stopping sync: RequestStop(),
DisableForUser() and StopSyncingPermanently(). The differences between
these are whether they set IsSyncRequested to false (DisableForUser
did not) and whether they clear the local sync data (RequestStop did
not).

In this CL there two methods for stopping sync, the public RequestStop()
and the private StopImpl(). Both take a parameter of the enum "DataFate",
which has two values: KEEP_DATA and CLEAR_DATA.

The pure logical mapping between the old and new is:

- RequestStop -> RequestStop(KEEP_DATA)
- StopSyncingPermanently -> RequestStop(CLEAR_DATA)
- DisableForUser -> StopImpl(CLEAR_DATA)

Since StopImpl() is private, any external uses of DisableForUser have been
converted to RequestStop(CLEAR_DATA), as well as some internal
uses for which it was deemed correct.

Finally, this CL contains a fix to a bug in Android's SigninManager that
those changes revealed. Previously the short circuit logic in
ProfileSyncServiceAndroid::EnableSync was preventing a crash
caused by it being called before native sign in, but with these changes
IsSyncRequested is correctly set to false and therefore the short
circuit is not hit.

BUG=495192

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

Cr-Commit-Position: refs/heads/master@{#335317}
diff --git a/chrome/browser/sync/profile_sync_service_android.cc b/chrome/browser/sync/profile_sync_service_android.cc
index 46b2d7ed..9862ba38 100644
--- a/chrome/browser/sync/profile_sync_service_android.cc
+++ b/chrome/browser/sync/profile_sync_service_android.cc
@@ -163,7 +163,7 @@
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   // Don't need to do anything if we're already disabled.
   if (sync_service_->IsSyncRequested()) {
-    sync_service_->RequestStop();
+    sync_service_->RequestStop(ProfileSyncService::KEEP_DATA);
   } else {
     DVLOG(2)
         << "Ignoring call to DisableSync() because sync is already disabled";
@@ -190,10 +190,7 @@
 void ProfileSyncServiceAndroid::SignOutSync(JNIEnv* env, jobject) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   DCHECK(profile_);
-  sync_service_->DisableForUser();
-
-  // Need to reset sync requested flag manually
-  sync_prefs_->SetSyncRequested(true);
+  sync_service_->RequestStop(ProfileSyncService::CLEAR_DATA);
 }
 
 void ProfileSyncServiceAndroid::FlushDirectory(JNIEnv* env, jobject) {