Avoid proxy thread hops for reading const properties.

This bypasses the proxy for the following properties:
* MediaStream::id()
* AudioTrack::kind() and AudioTrack::id()
* VideoTrack::kind() and VideoTrack::id()
* RtpReceiver::media_type() and RtpReceiver::id()
* RtpSender::media_type() and RtpSender::id()
* VideoTrackSource::remote() and VideoTrackSource::is_screencast()
* RtpTransceiver::media_type()

Bug: webrtc:11923
Change-Id: If7edea1781f778af3775515fc4af9a9e151c8103
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183767
Reviewed-by: Chen Xing <chxg@google.com>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32071}
diff --git a/api/media_stream_proxy.h b/api/media_stream_proxy.h
index 5169679..8ee33ca 100644
--- a/api/media_stream_proxy.h
+++ b/api/media_stream_proxy.h
@@ -22,7 +22,7 @@
 // are called on is an implementation detail.
 BEGIN_SIGNALING_PROXY_MAP(MediaStream)
 PROXY_SIGNALING_THREAD_DESTRUCTOR()
-PROXY_CONSTMETHOD0(std::string, id)
+BYPASS_PROXY_CONSTMETHOD0(std::string, id)
 PROXY_METHOD0(AudioTrackVector, GetAudioTracks)
 PROXY_METHOD0(VideoTrackVector, GetVideoTracks)
 PROXY_METHOD1(rtc::scoped_refptr<AudioTrackInterface>,
diff --git a/api/media_stream_track_proxy.h b/api/media_stream_track_proxy.h
index d3dc255..59dcb77 100644
--- a/api/media_stream_track_proxy.h
+++ b/api/media_stream_track_proxy.h
@@ -26,8 +26,8 @@
 
 BEGIN_SIGNALING_PROXY_MAP(AudioTrack)
 PROXY_SIGNALING_THREAD_DESTRUCTOR()
-PROXY_CONSTMETHOD0(std::string, kind)
-PROXY_CONSTMETHOD0(std::string, id)
+BYPASS_PROXY_CONSTMETHOD0(std::string, kind)
+BYPASS_PROXY_CONSTMETHOD0(std::string, id)
 PROXY_CONSTMETHOD0(TrackState, state)
 PROXY_CONSTMETHOD0(bool, enabled)
 PROXY_CONSTMETHOD0(AudioSourceInterface*, GetSource)
@@ -42,8 +42,8 @@
 
 BEGIN_PROXY_MAP(VideoTrack)
 PROXY_SIGNALING_THREAD_DESTRUCTOR()
-PROXY_CONSTMETHOD0(std::string, kind)
-PROXY_CONSTMETHOD0(std::string, id)
+BYPASS_PROXY_CONSTMETHOD0(std::string, kind)
+BYPASS_PROXY_CONSTMETHOD0(std::string, id)
 PROXY_CONSTMETHOD0(TrackState, state)
 PROXY_CONSTMETHOD0(bool, enabled)
 PROXY_METHOD1(bool, set_enabled, bool)
diff --git a/api/rtp_receiver_interface.h b/api/rtp_receiver_interface.h
index a15864e..786ea3a 100644
--- a/api/rtp_receiver_interface.h
+++ b/api/rtp_receiver_interface.h
@@ -128,8 +128,8 @@
 PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids)
 PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<MediaStreamInterface>>,
                    streams)
-PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
-PROXY_CONSTMETHOD0(std::string, id)
+BYPASS_PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
+BYPASS_PROXY_CONSTMETHOD0(std::string, id)
 PROXY_CONSTMETHOD0(RtpParameters, GetParameters)
 PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*)
 PROXY_METHOD1(void, SetJitterBufferMinimumDelay, absl::optional<double>)
diff --git a/api/rtp_sender_interface.h b/api/rtp_sender_interface.h
index bdbd6dc..a33b800 100644
--- a/api/rtp_sender_interface.h
+++ b/api/rtp_sender_interface.h
@@ -110,8 +110,8 @@
 PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
 PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtlsTransportInterface>, dtls_transport)
 PROXY_CONSTMETHOD0(uint32_t, ssrc)
-PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
-PROXY_CONSTMETHOD0(std::string, id)
+BYPASS_PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
+BYPASS_PROXY_CONSTMETHOD0(std::string, id)
 PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids)
 PROXY_CONSTMETHOD0(std::vector<RtpEncodingParameters>, init_send_encodings)
 PROXY_CONSTMETHOD0(RtpParameters, GetParameters)
diff --git a/api/video_track_source_proxy.h b/api/video_track_source_proxy.h
index 528b7cf..692ff64 100644
--- a/api/video_track_source_proxy.h
+++ b/api/video_track_source_proxy.h
@@ -23,8 +23,8 @@
 BEGIN_PROXY_MAP(VideoTrackSource)
 PROXY_SIGNALING_THREAD_DESTRUCTOR()
 PROXY_CONSTMETHOD0(SourceState, state)
-PROXY_CONSTMETHOD0(bool, remote)
-PROXY_CONSTMETHOD0(bool, is_screencast)
+BYPASS_PROXY_CONSTMETHOD0(bool, remote)
+BYPASS_PROXY_CONSTMETHOD0(bool, is_screencast)
 PROXY_CONSTMETHOD0(absl::optional<bool>, needs_denoising)
 PROXY_METHOD1(bool, GetStats, Stats*)
 PROXY_WORKER_METHOD2(void,