Bug 866333: Added extra check to avoid wrong events property returned in cases, when, for example event type coincides with Object property, such as nonstandard Object.prototype.watch, for instance
(cherry picked from commit 09f7197a85475fd9fdbaf64ffeec553e86fe2da8)
Bug 866333: adding test for event names like "watch"
Merge pull request #980 from erikvold/866333

Bug 866333: using event names like 'watch' dnw for port in content scripts r=@jsantell r=@erikvold