Do not create TaskScheduler/NetworkChangeNotifierFactory if it exists.

We have an android project which want to embed webview (not system one) and
cronet (native impl) together into one android app, but now webview and cronet
are conflicts with each other, because both initialize TaskScheduler and
NetworkChangeNotifierFactory, which will crash the app.

This cl adds interface to get current NetworkChangeNotifierFactory instance,
and ignore creating one if it exists; and for TaskScheduler, adds a new
interface to ContentBrowserClient to control create it or not at
browser_main_loop.cc, therefore we can disable it but initialize it at our own
entry point.

Bug: 801077
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I5fe5323677536f948847f6d7d56d132d42abff0d
Reviewed-on: https://chromium-review.googlesource.com/818924
Reviewed-by: Nasko Oskov <[email protected]>
Reviewed-by: Bo <[email protected]>
Reviewed-by: Paul Jensen <[email protected]>
Commit-Queue: Pengcheng Xu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#530011}
11 files changed