Issue #1631: Fixed a bug on removeEventListener

Bugfix for issue #1631 where removeEventListener would throw when no event listeners are registered on the object.
Updated patch for issue #1631 based on feedback
Merge pull request #1632 from tjoekbezoer/master

Issue #1631: Fixed a bug on removeEventListener