remove event if function code

this fixes a problem i was having with socket.io for ex:
socket.on("blah", this.eventhandler)
socket.removeListener("blah", this.eventhandler)