[Extensions] Check if the render frame created the document for app bindings
In the switch to render frames, there's now a chance that the document element
has been created before the JS sets up the callback. Check if it's done before
trying to wait on it.
BUG=511042
Review URL: https://codereview.chromium.org/1254453005
Cr-Commit-Position: refs/heads/master@{#340037}