Properly shutdown and release the MediaCodec resources when destroying a MediaCodecDelegate instance.