libevent reactor forking cleanup/fixes/refactoring