tests: add a test for event_free() from callback handler for signals Refs: https://github.com/libevent/libevent/issues/1287