Update audio and video WebCodec decoders and encoders close algorithms according latest spec
<rdar://problem/116346725>
Pull request: https://github.com/WebKit/WebKit/pull/18499
Committed 268781@main (abfc1105e4fe): <https://commits.webkit.org/268781@main> Reviewed commits have been landed. Closing PR #18499 and removing active labels.