chunks: move getNextSegmentNo() to PipelineInterests base class

This hides the "excluded segment" logic from subclasses and
reduces code duplication.

Change-Id: I9f7b5b88e6010e4e16a0876e79fc2ecb9ff8dc00
diff --git a/tools/chunks/catchunks/pipeline-interests-aimd.hpp b/tools/chunks/catchunks/pipeline-interests-aimd.hpp
index 3248100..5aedbfb 100644
--- a/tools/chunks/catchunks/pipeline-interests-aimd.hpp
+++ b/tools/chunks/catchunks/pipeline-interests-aimd.hpp
@@ -122,9 +122,8 @@
   /**
    * @brief fetch all the segments between 0 and lastSegment of the specified prefix
    *
-   * Starts the pipeline with an AIMD algorithm to control the window size. The pipeline will fetch
-   * every segment until the last segment is successfully received or an error occurs.
-   * The segment with segment number equal to m_excludedSegmentNo will not be fetched.
+   * Starts the pipeline with an AIMD algorithm to control the window size. The pipeline will
+   * fetch every segment until the last segment is successfully received or an error occurs.
    */
   void
   doRun() final;
@@ -181,12 +180,6 @@
   void
   decreaseWindow();
 
-  /** \return next segment number to retrieve
-   *  \post m_nextSegmentNo == return-value + 1
-   */
-  uint64_t
-  getNextSegmentNo();
-
   void
   cancelInFlightSegmentsGreaterThan(uint64_t segNo);
 
@@ -199,8 +192,6 @@
   Scheduler m_scheduler;
   scheduler::ScopedEventId m_checkRtoEvent;
 
-  uint64_t m_nextSegmentNo;
-
   uint64_t m_highData; ///< the highest segment number of the Data packet the consumer has received so far
   uint64_t m_highInterest; ///< the highest segment number of the Interests the consumer has sent so far
   uint64_t m_recPoint; ///< the value of m_highInterest when a packet loss event occurred,