IDF chief of staff resigns, says Oct. 7 failures will ‘haunt me forever’