Create/destroying codecs on task queue + switch to TaskQueueForTest.

After https://webrtc-review.googlesource.com/c/src/+/70740, we are
creating/destroying the codecs on a task queue in the VideoStreamEncoder. This
CL updates the VideoCodecTest to do the same.

Also, this CL switches from manually Wait()'ing on the task queue to using
TaskQueueForTest::SendTask.

Bug: None
Change-Id: Ia0398b24e32e9cc5361ba5ee4c08441116def18e
Reviewed-on: https://webrtc-review.googlesource.com/76800
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23257}
diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn
index 12ded47..a35c410 100644
--- a/modules/video_coding/BUILD.gn
+++ b/modules/video_coding/BUILD.gn
@@ -623,6 +623,7 @@
       "../../rtc_base:checks",
       "../../rtc_base:rtc_base_approved",
       "../../rtc_base:rtc_task_queue",
+      "../../rtc_base:rtc_task_queue_for_test",
       "../../rtc_base:sequenced_task_checker",
       "../../system_wrappers",
       "../../test:fileutils",
@@ -693,6 +694,7 @@
       "../../rtc_base:checks",
       "../../rtc_base:rtc_base",
       "../../rtc_base:rtc_base_tests_utils",
+      "../../rtc_base:rtc_task_queue_for_test",
       "../../system_wrappers",
       "../../test:fileutils",
       "../../test:test_support",
@@ -850,6 +852,7 @@
       "../../rtc_base:rtc_base_tests_utils",
       "../../rtc_base:rtc_numerics",
       "../../rtc_base:rtc_task_queue",
+      "../../rtc_base:rtc_task_queue_for_test",
       "../../system_wrappers",
       "../../system_wrappers:field_trial_api",
       "../../system_wrappers:metrics_api",