In rtc::Thread hide MessageHandler handling as implementation details

Remote Peek function as unused
Move Get and Dispatch into private section to ensure they are not used
from outside.

Bug: webrtc:9702
Change-Id: Ibd0b236fe43543d60f97f988524526493bbeaaa7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272804
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37889}
diff --git a/rtc_base/virtual_socket_server.cc b/rtc_base/virtual_socket_server.cc
index 91b486b..a055e59 100644
--- a/rtc_base/virtual_socket_server.cc
+++ b/rtc_base/virtual_socket_server.cc
@@ -647,10 +647,7 @@
       fake_clock_->AdvanceTime(webrtc::TimeDelta::Millis(1));
     } else {
       // Otherwise, run a normal message loop.
-      Message msg;
-      if (msg_queue_->Get(&msg, Thread::kForever)) {
-        msg_queue_->Dispatch(&msg);
-      }
+      msg_queue_->ProcessMessages(Thread::kForever);
     }
   }
   stop_on_idle_ = false;