tevent: Fix a segfault upon the first signal
When the first signal arrives, tevent_common_signal_handler() crashed: "ev" is
initialized to NULL, so the first "write(ev->pipe_fds[1], &c, 1);" dereferences
NULL.
Rusty, Tridge, please check. Also, can you tell me a bit more about the
environment you tested this in? I'd be curious to see where this survived.
Thanks,
Volker
(cherry picked from commit
23abcd2318c69753aa2a144e1dc0f9cf9efdb705)
(cherry picked from commit
1108225c1316521bf2bb59c9b99b030440af0002)