Extract utilities from ResourceDispatcher to be reused for navigation

This is a preparation to not using WebURLLoader for main resource.
See step 6.c in the doc linked to the bug.

Extracted various NotifyRequestXXX methods which record histograms
and send stats to the browser process.
Also extracted WebURLError creation helper.

Bug: 855189
Change-Id: Ic1321e442da8b1f887fb76905a867fa10b6802ee
Reviewed-on: https://chromium-review.googlesource.com/c/1395779
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621127}
6 files changed