Adding some features to proxy.h, and restructuring the macros.

New features are:
- Invoke a destructor on the worker thread.
- Make proxy wrapper for a non-refcounted object.
- Ability to use unique_ptrs (as arguments or return values).

These features are needed by this CL:
https://codereview.webrtc.org/2632613002/

BUG=None

Review-Url: https://codereview.webrtc.org/2628343003
Cr-Commit-Position: refs/heads/master@{#16151}
diff --git a/webrtc/api/peerconnectionproxy.h b/webrtc/api/peerconnectionproxy.h
index 1609a75..ed707b3 100644
--- a/webrtc/api/peerconnectionproxy.h
+++ b/webrtc/api/peerconnectionproxy.h
@@ -18,10 +18,9 @@
 
 // Define proxy for PeerConnectionInterface.
 BEGIN_SIGNALING_PROXY_MAP(PeerConnection)
-  PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>,
-                local_streams)
-  PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>,
-                remote_streams)
+  PROXY_SIGNALING_THREAD_DESTRUCTOR()
+  PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, local_streams)
+  PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, remote_streams)
   PROXY_METHOD1(bool, AddStream, MediaStreamInterface*)
   PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*)
   PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>,
@@ -30,7 +29,8 @@
                 std::vector<MediaStreamInterface*>)
   PROXY_METHOD1(bool, RemoveTrack, RtpSenderInterface*)
   PROXY_METHOD1(rtc::scoped_refptr<DtmfSenderInterface>,
-                CreateDtmfSender, AudioTrackInterface*)
+                CreateDtmfSender,
+                AudioTrackInterface*)
   PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>,
                 CreateSender,
                 const std::string&,
@@ -39,12 +39,16 @@
                      GetSenders)
   PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpReceiverInterface>>,
                      GetReceivers)
-  PROXY_METHOD3(bool, GetStats, StatsObserver*,
+  PROXY_METHOD3(bool,
+                GetStats,
+                StatsObserver*,
                 MediaStreamTrackInterface*,
                 StatsOutputLevel)
   PROXY_METHOD1(void, GetStats, RTCStatsCollectorCallback*)
   PROXY_METHOD2(rtc::scoped_refptr<DataChannelInterface>,
-                CreateDataChannel, const std::string&, const DataChannelInit*)
+                CreateDataChannel,
+                const std::string&,
+                const DataChannelInit*)
   PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, local_description)
   PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, remote_description)
   PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
@@ -55,9 +59,13 @@
                      current_local_description)
   PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
                      current_remote_description)
-  PROXY_METHOD2(void, CreateOffer, CreateSessionDescriptionObserver*,
+  PROXY_METHOD2(void,
+                CreateOffer,
+                CreateSessionDescriptionObserver*,
                 const MediaConstraintsInterface*)
-  PROXY_METHOD2(void, CreateAnswer, CreateSessionDescriptionObserver*,
+  PROXY_METHOD2(void,
+                CreateAnswer,
+                CreateSessionDescriptionObserver*,
                 const MediaConstraintsInterface*)
   PROXY_METHOD2(void,
                 CreateOffer,
@@ -67,9 +75,13 @@
                 CreateAnswer,
                 CreateSessionDescriptionObserver*,
                 const RTCOfferAnswerOptions&)
-  PROXY_METHOD2(void, SetLocalDescription, SetSessionDescriptionObserver*,
+  PROXY_METHOD2(void,
+                SetLocalDescription,
+                SetSessionDescriptionObserver*,
                 SessionDescriptionInterface*)
-  PROXY_METHOD2(void, SetRemoteDescription, SetSessionDescriptionObserver*,
+  PROXY_METHOD2(void,
+                SetRemoteDescription,
+                SetSessionDescriptionObserver*,
                 SessionDescriptionInterface*)
   PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration);
   PROXY_METHOD2(bool,
@@ -90,7 +102,7 @@
   PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t)
   PROXY_METHOD0(void, StopRtcEventLog)
   PROXY_METHOD0(void, Close)
-END_SIGNALING_PROXY()
+END_PROXY_MAP()
 
 }  // namespace webrtc