Ukraine is closer to NATO than ever before, alliance chief says in farewell talk