lib_evconnection: improve signal handling; add callback