Prevent multiple bindings of same listener for an event

In our use-cases we find it useful to prevent the adding of the same listener function. I'm not sure if it is generally applicable but I'm putting up the pull request for consideration. Thanks for your work!