Israel's army chief resigns over 'terrible failure' to prevent Hamas' 7 October attack