Push document metadata from guest to panel

By changing which end initiates the communication of document metadata,
the guest can ensure that it has sent this basic info before continuing
with expensive operations, such as scanning the DOM text. The panel has
a chance to initiate asynchronous operations, such as API requests to
load annotations, before the guest continues.
Ideally these should be called with `setTimeout` or similar to ensure the same behaviour as the promise.