CCodec: skip first N longest work inside total delay

If the client pauses pushing input to the component, work items inside
total delay may sit in the pipeline indefinitely. We don't want to
error out for those work. Once the client pushes EOS, ensure all work
items finishes within reasonable time regardless of delay.

Bug: 124355114
Test: manual
Test: atest CtsSecurityTestCases:StagefrightTest
Test: atest CtsMediaTestCases -- --module-arg CtsMediaTestCases:size:small
Change-Id: I0e95b2ddb94482da855d70cbe75f6bffaaffe279
diff --git a/media/codec2/sfplugin/CCodecBufferChannel.h b/media/codec2/sfplugin/CCodecBufferChannel.h
index 9dccab8..9ce886a 100644
--- a/media/codec2/sfplugin/CCodecBufferChannel.h
+++ b/media/codec2/sfplugin/CCodecBufferChannel.h
@@ -236,6 +236,7 @@
 
     size_t mNumInputSlots;
     size_t mNumOutputSlots;
+    size_t mDelay;
 
     Mutexed<std::unique_ptr<InputBuffers>> mInputBuffers;
     Mutexed<std::list<sp<ABuffer>>> mFlushedConfigs;