DocumentLoader: handle various failing situations upfront

Instead of figuring out that we should not load somewhere in
the middle of the process, we introduce PrepareForLoad() method
and make StartLoading always commit navigation.

This will make it possible to remove provisional document loader.

Drive-by: fixed a bug where SetMixedAutoupgradeOptOut was called
on a wrong document, but the test was failing to load a document
and did not catch that.

Bug: 855189
Change-Id: I2abb16b616b32fa67494425a7a81dc91e5905818
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1535180
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#643570}
4 files changed