[fix] Delayed removal of event emitters

The reason for this is so plugins can emit extra events after the `close` event and
or do some additional clean up.