Make all tests pass under EVENT_DEBUG_MODE=1

The fix was easy: the tests that were failing were those tests that
also enabled debug mode themselves. So, let them know when
EVENT_DEBUG_MODE is on, so they won't do that.
Implement event_finalize() and related functions to avoid certain deadlocks
Add some verbose notes to bufferevent unit tests
Use finalization feature so bufferevents can avoid deadlocks

Since the bufferevents' events are now EV_FINALIZE (name pending),
they won't deadlock.  To clean up properly, though, we must use the
finalization feature.

This patch also split bufferevent deallocation into an "unlink" step
that happens fast, and a "destruct" step that happens after
finalization.

More work is needed: there needs to be a way to specify a finalizer
for the bufferevent's argument itself.  Also, this finalizer business
makes lots of the reference counting we were doing unnecessary.

Also, more testing is needed.
Always run pending finalizers when event_base_free() is called

There was actually a bug in the original version of this: it tried to
run the finalizers after (potentially) setting current_base to NULL;
but those finalizers could themselves (potentially) be invoking stuff
that needed to know about the current event_base.  So the right time to
do it is _before_ clearing current_base.
Remove bufferevent_del_generic_timeout_cbs as now unused
More documentation for finalization feature
Make the event_finalize* functions return an error code
Remove a no-longer-true XXXX comment.
Merge branch '21_deadlock_fix_v2'