Bug 828076 - Trusted UI should notify caller(s) when it is closed

This is a blocker for a basecamp-blocker, https://bugzilla.mozilla.org/show_bug.cgi?id=823751

@ferjm and I have been discussing this implementation on IRC, so I'd like to ask him to review it and make sure it still works for marketplace.

@ferjm, do you mind taking a look?  Thanks, j