Address vptr race condition while PeerConnection is destructed.

Auxiliary threads (worker, network) are still active
while PeerConnection is destructed, leading to race condition
in tests such as:
  * RTCStatsIntegrationTest.GetStatsFromCaller
  * RTCStatsIntegrationTest.GetsStatsWhileDestroyingPeerConnection

This CL prevents the conflict to happen by explicitly
closing the PeerConnection.

Bug: webrtc:9847
Change-Id: I40880bb9b193201711031b8c4563c6bbd4983c71
Reviewed-on: https://webrtc-review.googlesource.com/c/104820
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25801}
diff --git a/pc/rtcstats_integrationtest.cc b/pc/rtcstats_integrationtest.cc
index 46687ba..ef29cbc 100644
--- a/pc/rtcstats_integrationtest.cc
+++ b/pc/rtcstats_integrationtest.cc
@@ -809,11 +809,11 @@
   EXPECT_FALSE(report->size());
 }
 
-// TODO(bugs.webrtc.org/9847) Remove this test altogether if a proper fix cannot
-// be found. For now it is lying, as we cannot safely gets stats while
-// destroying PeerConnection.
+// TODO(bugs.webrtc.org/10041) For now this is equivalent to the following
+// test GetsStatsWhileClosingPeerConnection, because pc() is closed by
+// PeerConnectionTestWrapper. See: bugs.webrtc.org/9847
 TEST_F(RTCStatsIntegrationTest,
-       DISABLED_GetsStatsWhileDestroyingPeerConnection) {
+       DISABLED_GetStatsWhileDestroyingPeerConnection) {
   StartCall();
 
   rtc::scoped_refptr<RTCStatsObtainer> stats_obtainer =