fixup! Use finalization feature so bufferevents can avoid deadlocks
fixup! Implement event_finalize() and related functions to avoid certain deadlocks

Whoops; this wasn't supposed to get committed.