Add support for Pusher to be run as a daemon, allowing cleaner closing behavior. Add exception handling for some Connection events.