Only add uncaughtException listener when API methods are called

Instead of adding the uncaughtException listener whenever the module is required, the listener is only registered when exported methods are used.  Listeners are unregistered after API method callbacks are called.