Bug 1039585 - [Messages][Refactoring] Implement EventDispatcher object. r=julien

I don't like this pattern so much; I spent like 5 minutes trying to find where "this.delete" and "this.set" was coming from.

Maybe it would be more readable to have `{ map: new Map() }` instead, and replace "this.delete" and "this.set" by "this.map.delete" and "this.map.set"; not really different but maybe more readable?