Fix event handling in web-bluetooth api
Fix event handling in web-bluetooth api

Currently, all events are stored in a global objects called `events`, indexed by the target Object. This causes a bug where all event listeners are shared between all objects. The reason is that JavaScript only support string indices for objects, and therefore, `events[this]` actually becomes `events[this.toString()]`, and the `toString()` methods of all objects return '[object Object]'. 

So with the current implementation, all the event listeners are always stored inside `events['[object Object]']`, regardless of the actual object. The proposed fix simply stores the event listeners inside the object itself, in a property called `__events`. Another option would be to use Symbol or WeakMap, if we target ES6 only.
thegecko/bleat