tevent: Add utility function epoll_handle_hup_or_err()