Move base locking into event_base_free_() (fix for 12d520f)

See also #60