Manually handle cookies
Make open window work with latest chat separation changes
Work around for uri.host being undefined in webrtc prompts
Bug 1007190 Separate out handleWindowClose from MozSocialAPI so that it can be used by Loop.
Use the new exported function for handling panel and chatbox closes