Remove use of RtpHeaderExtension and clean up

Currently there are two structs that are identical and track extension details:
webrtc::RtpExtension
cricket::RtpHeaderExtension

The use of the structs is mixed in the code to track the extensions being
supported. This results in duplicate definition of
the URI constants and there is code to convert between the two structs.

Clean up to use a single RtpHeader throughout the codebase. The actual location
of RtpHeader may change in future (perhaps to be located in api/). Additionally,
this CL renames some of the constants to clarify Uri and Id use.

BUG= webrtc:5895

Review-Url: https://codereview.webrtc.org/1984983002
Cr-Commit-Position: refs/heads/master@{#12924}
diff --git a/webrtc/pc/mediasession.cc b/webrtc/pc/mediasession.cc
index 0fa20d8..358f92d 100644
--- a/webrtc/pc/mediasession.cc
+++ b/webrtc/pc/mediasession.cc
@@ -374,11 +374,10 @@
 
 // Helper class used for finding duplicate RTP Header extension ids among
 // audio and video extensions.
-class UsedRtpHeaderExtensionIds : public UsedIds<RtpHeaderExtension> {
+class UsedRtpHeaderExtensionIds : public UsedIds<webrtc::RtpExtension> {
  public:
   UsedRtpHeaderExtensionIds()
-      : UsedIds<RtpHeaderExtension>(kLocalIdMin, kLocalIdMax) {
-  }
+      : UsedIds<webrtc::RtpExtension>(kLocalIdMin, kLocalIdMax) {}
 
  private:
   // Min and Max local identifier for one-byte header extensions, per RFC5285.
@@ -890,10 +889,9 @@
   }
 }
 
-
 static bool FindByUri(const RtpHeaderExtensions& extensions,
-                      const RtpHeaderExtension& ext_to_match,
-                      RtpHeaderExtension* found_extension) {
+                      const webrtc::RtpExtension& ext_to_match,
+                      webrtc::RtpExtension* found_extension) {
   for (RtpHeaderExtensions::const_iterator it = extensions.begin();
        it  != extensions.end(); ++it) {
     // We assume that all URIs are given in a canonical format.
@@ -915,7 +913,7 @@
                                     RtpHeaderExtensions* all_extensions,
                                     UsedRtpHeaderExtensionIds* used_ids) {
   for (auto& extension : *offered_extensions) {
-    RtpHeaderExtension existing;
+    webrtc::RtpExtension existing;
     if (FindByUri(*all_extensions, extension, &existing)) {
       extension.id = existing.id;
     } else {
@@ -934,7 +932,7 @@
     UsedRtpHeaderExtensionIds* used_ids) {
   for (auto reference_extension : reference_extensions) {
     if (!FindByUri(*offered_extensions, reference_extension, NULL)) {
-      RtpHeaderExtension existing;
+      webrtc::RtpExtension existing;
       if (FindByUri(*all_extensions, reference_extension, &existing)) {
         offered_extensions->push_back(existing);
       } else {
@@ -953,7 +951,7 @@
   RtpHeaderExtensions::const_iterator ours;
   for (ours = local_extensions.begin();
        ours != local_extensions.end(); ++ours) {
-    RtpHeaderExtension theirs;
+    webrtc::RtpExtension theirs;
     if (FindByUri(offered_extensions, *ours, &theirs)) {
       // We respond with their RTP header extension id.
       negotiated_extenstions->push_back(theirs);