Adds debug functionality to stop listening methods.

This adds DEBUG functionality to the stop listening methods. This makes it so `trigger` and `stopListening` both give warnings when you call them with an unregistered event.