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