ctdb-ib: make sure the tevent_fd is removed before the fd is closed