Add a LoadComplete message so that script informs the constellation,
which can then inform the compositor (and anyone else, later) about
the completion of loading a page. This is important for ref tests,
which should not emit a PNG until load has completed, even if we
perform a composite before then.
auto merge of #1597 : larsbergstrom/servo/add_page_loaded, r=pcwalton

Add a LoadComplete message so that script informs the constellation, which can then inform the compositor (and anyone else, later) about the completion of loading a page. This is important for ref tests, which should not emit a PNG until load has completed, even if we perform a composite before then.

Note that we must *also* wait for the `ready_state` to indicate that additionally layout has completed any associated reflow with the page, otherwise we could get the `LoadComplete` while the final reflow is still in progress and thus would write out the `n-1`'th reflow result.

r? @pcwalton