Replace WeakPtr with CancelablePeriodicTask in RtcpTransceiverImpl

This allow to destroy the RtcpTransceiverImpl off the task queue
with assumption it is destroyed after task queue.
i.e. it allows to post destruction of RtcpTransceiverImpl to the TaskQueue without waiting.

BUG: webrtc:8239
Change-Id: I4bea7a6d2edc97061ebd00f2f275c1ab827bc3c5
Reviewed-on: https://webrtc-review.googlesource.com/97160
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24574}
diff --git a/modules/rtp_rtcp/source/rtcp_transceiver_impl.h b/modules/rtp_rtcp/source/rtcp_transceiver_impl.h
index 7bcd16f..c97b2c5 100644
--- a/modules/rtp_rtcp/source/rtcp_transceiver_impl.h
+++ b/modules/rtp_rtcp/source/rtcp_transceiver_impl.h
@@ -24,8 +24,8 @@
 #include "modules/rtp_rtcp/source/rtcp_packet/report_block.h"
 #include "modules/rtp_rtcp/source/rtcp_packet/target_bitrate.h"
 #include "modules/rtp_rtcp/source/rtcp_transceiver_config.h"
+#include "rtc_base/cancelable_task_handle.h"
 #include "rtc_base/constructormagic.h"
-#include "rtc_base/weak_ptr.h"
 #include "system_wrappers/include/ntp_time.h"
 
 namespace webrtc {
@@ -95,7 +95,7 @@
   // TODO(danilchap): Remove entries from remote_senders_ that are no longer
   // needed.
   std::map<uint32_t, RemoteSenderState> remote_senders_;
-  rtc::WeakPtrFactory<RtcpTransceiverImpl> ptr_factory_;
+  rtc::CancelableTaskHandle periodic_task_handle_;
 
   RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RtcpTransceiverImpl);
 };