Remove TemporalLayersFactory and associated classes

As the rate allocation has been moved into entirely into
SimulcastRateAllocator, and the listeners are thus no longer needed,
this class doesn't fill any other purpose than to determine if
ScreenshareLayers or TemporalLayers should be created for a given
simulcast stream. This can however be done just from looking at the
VideoCodec instance, so changing this into a static factory method.

Due to dependencies from upstream projects, keep the class name and
field in VideoCodec around for now.

Bug: webrtc:9012
Change-Id: I028fe6b2a19e0d16b35956cc2df01dcf5bfa7979
Reviewed-on: https://webrtc-review.googlesource.com/63264
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22529}
diff --git a/modules/video_coding/codecs/test/videoprocessor.cc b/modules/video_coding/codecs/test/videoprocessor.cc
index abec345..7c4df05 100644
--- a/modules/video_coding/codecs/test/videoprocessor.cc
+++ b/modules/video_coding/codecs/test/videoprocessor.cc
@@ -37,18 +37,6 @@
 const int kMsToRtpTimestamp = kVideoPayloadTypeFrequency / 1000;
 const int kMaxBufferedInputFrames = 10;
 
-std::unique_ptr<VideoBitrateAllocator> CreateBitrateAllocator(
-    TestConfig* config) {
-  std::unique_ptr<TemporalLayersFactory> tl_factory;
-  if (config->codec_settings.codecType == VideoCodecType::kVideoCodecVP8) {
-    tl_factory.reset(new TemporalLayersFactory());
-    config->codec_settings.VP8()->tl_factory = tl_factory.get();
-  }
-  return std::unique_ptr<VideoBitrateAllocator>(
-      VideoCodecInitializer::CreateBitrateAllocator(config->codec_settings,
-                                                    std::move(tl_factory)));
-}
-
 size_t GetMaxNaluSizeBytes(const EncodedImage& encoded_frame,
                            const TestConfig& config) {
   if (config.codec_settings.codecType != kVideoCodecH264)
@@ -179,7 +167,8 @@
       stats_(stats),
       encoder_(encoder),
       decoders_(decoders),
-      bitrate_allocator_(CreateBitrateAllocator(&config_)),
+      bitrate_allocator_(VideoCodecInitializer::CreateBitrateAllocator(
+          config_.codec_settings)),
       framerate_fps_(0),
       encode_callback_(this),
       decode_callback_(this),