Add some assertions to please coverity.

In event_process_active_single_queue, EVLIST_INIT must be set on any
event that uses one of the event-only closures, and so "ev" will be
set in those cases.  But coverity's worried here (CIDs numerous).  So
instead, just add the assertions that should make it happy.
Move event_debug_note_teardown_ before mm_free.

This isn't a bug, since only the pointer value of ev was used, but
it's probably best not to tempt fate.  Found by coverity.