PlzNavigate: Fix ordering of onBeforeNavigate and onCreatedNavigationTarget.

This CL fixes the ordering of onCreatedNavigationTarget and
onBeforeNavigate to be correct in all cases of navigating in new tabs.
Since navigating in new tabs is done through chrome::Navigate with the
proper disposition, the navigation in that case is kicked off before the
tab is added to the tabstrip. With PlzNavigate, the difference is that
the WebContentsObserver::DidStartNavigation is fired in the same event
loop, so it causes onBeforeNavigate to be dispatched before
onCreatedNavigationTarget. Prior to PlzNavigate, the navigation had to
go to the renderer process, which starts it there and
WebContentsObserver::DidStartNavigation is fired in the next iteration
of the event loop, which accidentally gives us the right ordering.

BUG=575230

Review-Url: https://codereview.chromium.org/2545133002
Cr-Commit-Position: refs/heads/master@{#436471}
5 files changed