Update inspector protocol test that relied on timing.

I am working on https://crbug.com/831155. Some tests that are relying
on how things are scheduled in Blink are failing.

This CL makes 2 tests to keep working.
 *  inspector-protocol/page/frameAttachedDetached.js
 *  inspector-protocol/sessions/page-frame-events.js

In these two tests, a frame is navigated twice. Immediately after the first
load starts, a second navigation is requested.

The tests expect Page.OnFrameStartedLoading to be called twice. The
issue is the first load may not be finished when the second navigation
is started.

ProgressTracker::ProgressStarted() doesn't send the
frameStartedLoading() if the frame is already loading something when
FrameLoader::StartLoading is called.

To fix the issue, the tests now wait for the frame to stop loading
before navigating again.

Bug: 831155
Change-Id: Iee71767be6d15dbf53c370bb414fe57015dd1df6
Reviewed-on: https://chromium-review.googlesource.com/1071791
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562267}
2 files changed