Prevent callbacks from being called more than once

When calling a callback multiple times, it would lead to premature
queue exhaustion. This is now prevented. An error event is emmitted
if there is an error event handler. If not, the error message is
logged to stderr. Not sure I like that, but need to do something.

This possibly will leak the emitter variable