Reorganize PendingEvent as a class
Keep signal handler cancelers in PendingEvent