Fix use after free in I18nSourceStream.

This adds explicit lifetime management between URLRequestChromeJob and
URLDataSourceImpl, by having the job own a shared_refptr to the data
source. This allows the data source to be detached from the backend
yet remain alive as long as the request job is still alive (which
eventually wants to use its i18n template replacements map).

BUG=863318

Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I84caa70dff1e1c65ac430fca11656e85e4a6eebd
Reviewed-on: https://chromium-review.googlesource.com/1156625
Commit-Queue: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: Tommy Li <tommycli@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579994}
3 files changed