Reland of Adding the ability to create an RtpSender without a track. (patchset #1 id:1 of https://codereview.webrtc.org/1426443007/ )

Reason for revert:
Relanding, after changing the expectations of WebRtcBrowserTest.CallAndModifyStream.

Original issue's description:
> Revert of Adding the ability to create an RtpSender without a track. (patchset #8 id:140001 of https://codereview.webrtc.org/1413713003/ )
>
> Reason for revert:
> Causing a compiler warning, and causing WebRtcBrowserTest.CallAndModifyStream to fail.
>
> Original issue's description:
> > Adding the ability to create an RtpSender without a track.
> >
> > This CL also changes AddStream to immediately create a sender, rather
> > than waiting until the track is seen in SDP. And the PeerConnection now
> > builds the list of "send streams" from the list of senders, rather than
> > the collection of local media streams.
> >
> > Committed: https://crrev.com/ac9d92ccbe2b29590c53f702e11dc625820480d5
> > Cr-Commit-Position: refs/heads/master@{#10414}
>
> TBR=pthatcher@webrtc.org,pthatcher@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/8f46c63f6f764254892f4111b54aa1cc8f32eeeb
> Cr-Commit-Position: refs/heads/master@{#10417}

TBR=pthatcher@webrtc.org,pthatcher@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.webrtc.org/1413983004

Cr-Commit-Position: refs/heads/master@{#10730}
diff --git a/webrtc/base/helpers.cc b/webrtc/base/helpers.cc
index 8e59b64..1ad5d0e 100644
--- a/webrtc/base/helpers.cc
+++ b/webrtc/base/helpers.cc
@@ -164,17 +164,21 @@
   int seed_;
 };
 
-// TODO: Use Base64::Base64Table instead.
-static const char BASE64[64] = {
-  'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
-  'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
-  'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
-  'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
-  '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'
-};
-
 namespace {
 
+// TODO: Use Base64::Base64Table instead.
+static const char kBase64[64] = {
+    'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
+    'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+    'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
+    'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
+    '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'};
+
+static const char kHex[16] = {'0', '1', '2', '3', '4', '5', '6', '7',
+                              '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
+
+static const char kUuidDigit17[4] = {'8', '9', 'a', 'b'};
+
 // This round about way of creating a global RNG is to safe-guard against
 // indeterminant static initialization order.
 scoped_ptr<RandomGenerator>& GetGlobalRng() {
@@ -232,7 +236,7 @@
 }
 
 bool CreateRandomString(size_t len, std::string* str) {
-  return CreateRandomString(len, BASE64, 64, str);
+  return CreateRandomString(len, kBase64, 64, str);
 }
 
 bool CreateRandomString(size_t len, const std::string& table,
@@ -241,6 +245,41 @@
                             static_cast<int>(table.size()), str);
 }
 
+// Version 4 UUID is of the form:
+// xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
+// Where 'x' is a hex digit, and 'y' is 8, 9, a or b.
+std::string CreateRandomUuid() {
+  std::string str;
+  scoped_ptr<uint8_t[]> bytes(new uint8_t[31]);
+  if (!Rng().Generate(bytes.get(), 31)) {
+    LOG(LS_ERROR) << "Failed to generate random string!";
+    return str;
+  }
+  str.reserve(36);
+  for (size_t i = 0; i < 8; ++i) {
+    str.push_back(kHex[bytes[i] % 16]);
+  }
+  str.push_back('-');
+  for (size_t i = 8; i < 12; ++i) {
+    str.push_back(kHex[bytes[i] % 16]);
+  }
+  str.push_back('-');
+  str.push_back('4');
+  for (size_t i = 12; i < 15; ++i) {
+    str.push_back(kHex[bytes[i] % 16]);
+  }
+  str.push_back('-');
+  str.push_back(kUuidDigit17[bytes[15] % 4]);
+  for (size_t i = 16; i < 19; ++i) {
+    str.push_back(kHex[bytes[i] % 16]);
+  }
+  str.push_back('-');
+  for (size_t i = 19; i < 31; ++i) {
+    str.push_back(kHex[bytes[i] % 16]);
+  }
+  return str;
+}
+
 uint32_t CreateRandomId() {
   uint32_t id;
   if (!Rng().Generate(&id, sizeof(id))) {