Allow an external audio processing module to be used in WebRTC

[This CL is a rebase of an original CL by solenberg@:
https://codereview.webrtc.org/2948763002/ which in turn was a
rebase of an original CL by peah@:
https://chromium-review.googlesource.com/c/527032/]

Allow an external audio processing module to be used in WebRTC

This CL adds support for optionally using an externally created audio
processing module in a peerconnection. The ownership is shared
between the peerconnection and the external creator of the module.

As part of this the internal ownership of the audio processing module
is moved from VoiceEngine to WebRtcVoiceEngine.

BUG=webrtc:7775

Review-Url: https://codereview.webrtc.org/2961723004
Cr-Commit-Position: refs/heads/master@{#18837}
diff --git a/webrtc/call/call_unittest.cc b/webrtc/call/call_unittest.cc
index 8f0a340..5267e7a 100644
--- a/webrtc/call/call_unittest.cc
+++ b/webrtc/call/call_unittest.cc
@@ -37,8 +37,8 @@
     webrtc::AudioState::Config audio_state_config;
     audio_state_config.voice_engine = &voice_engine_;
     audio_state_config.audio_mixer = webrtc::AudioMixerImpl::Create();
+    audio_state_config.audio_processing = webrtc::AudioProcessing::Create();
     EXPECT_CALL(voice_engine_, audio_device_module());
-    EXPECT_CALL(voice_engine_, audio_processing());
     EXPECT_CALL(voice_engine_, audio_transport());
     webrtc::Call::Config config(&event_log_);
     config.audio_state = webrtc::AudioState::Create(audio_state_config);
@@ -453,11 +453,13 @@
   };
   ScopedVoiceEngine voice_engine;
 
-  voice_engine.base->Init(&mock_adm);
   AudioState::Config audio_state_config;
   audio_state_config.voice_engine = voice_engine.voe;
   audio_state_config.audio_mixer = mock_mixer;
+  audio_state_config.audio_processing = AudioProcessing::Create();
+  voice_engine.base->Init(&mock_adm, audio_state_config.audio_processing.get());
   auto audio_state = AudioState::Create(audio_state_config);
+
   RtcEventLogNullImpl event_log;
   Call::Config call_config(&event_log);
   call_config.audio_state = audio_state;