Replace scoped_ptr with unique_ptr in webrtc/api/

But keep #including scoped_ptr.h in .h files, so as not to break
WebRTC users who expect those .h files to give them rtc::scoped_ptr.

BUG=webrtc:5520

Review URL: https://codereview.webrtc.org/1930463002

Cr-Commit-Position: refs/heads/master@{#12530}
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
index 70a386e..7f1f452 100644
--- a/webrtc/api/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -526,8 +526,8 @@
 
 bool PeerConnection::Initialize(
     const PeerConnectionInterface::RTCConfiguration& configuration,
-    rtc::scoped_ptr<cricket::PortAllocator> allocator,
-    rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
+    std::unique_ptr<cricket::PortAllocator> allocator,
+    std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
     PeerConnectionObserver* observer) {
   TRACE_EVENT0("webrtc", "PeerConnection::Initialize");
   RTC_DCHECK(observer != nullptr);
@@ -628,7 +628,7 @@
                                           &PeerConnection::OnVideoTrackAdded);
   observer->SignalVideoTrackRemoved.connect(
       this, &PeerConnection::OnVideoTrackRemoved);
-  stream_observers_.push_back(rtc::scoped_ptr<MediaStreamObserver>(observer));
+  stream_observers_.push_back(std::unique_ptr<MediaStreamObserver>(observer));
 
   for (const auto& track : local_stream->GetAudioTracks()) {
     OnAudioTrackAdded(track.get(), local_stream);
@@ -655,7 +655,7 @@
   stream_observers_.erase(
       std::remove_if(
           stream_observers_.begin(), stream_observers_.end(),
-          [local_stream](const rtc::scoped_ptr<MediaStreamObserver>& observer) {
+          [local_stream](const std::unique_ptr<MediaStreamObserver>& observer) {
             return observer->stream()->label().compare(local_stream->label()) ==
                    0;
           }),
@@ -835,7 +835,7 @@
   TRACE_EVENT0("webrtc", "PeerConnection::CreateDataChannel");
   bool first_datachannel = !HasDataChannels();
 
-  rtc::scoped_ptr<InternalDataChannelInit> internal_config;
+  std::unique_ptr<InternalDataChannelInit> internal_config;
   if (config) {
     internal_config.reset(new InternalDataChannelInit(*config));
   }