In a surprise visit to Iraq, the defense secretary said Obama’s timetable still stands.