lib/tevent: handle tevent_common_add_signal on different event contexts.