Watch for the tab's `beforeunload` and destroy RDM when it happens. This
resolves issues with session restore getting confused about the state of content
managed by RDM.
MozReview-Commit-ID: DXs87Xm11JR
This change brings the following improvements to RDM:
* Page state is preserved when toggling in and out of RDM
* Session history is no longer manipulated, so the tool UI won't end up in the
tab's back-forward page list.
Known issues to be fixed later:
* The browser UI is not hooked up to the viewport browser
* Restarting the browser with the tool open shows a confused, empty RDM
MozReview-Commit-ID: Fb6QRv6LYow