Fixing some issues with the direction attribute of m-lines in offers.

By default, we'll now offer to receive if already receiving
(meaning that the last remote description contained a track).

Also, m-lines that are neither receiving nor sending are now correctly
marked "inactive".

Also moved some logic relating to default tracks out of webrtcsdp.cc,
such that now the direction seen by upper layers will always be
consistent with the consumed/produced SDP.

BUG=528089

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

Cr-Original-Commit-Position: refs/heads/master@{#10376}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: c80741f8957b537e968397ac54ff5b5df8a2c318
diff --git a/p2p/base/sessiondescription.h b/p2p/base/sessiondescription.h
index 1182a67..7880167 100644
--- a/p2p/base/sessiondescription.h
+++ b/p2p/base/sessiondescription.h
@@ -160,10 +160,15 @@
   // Remove the first group with the same semantics specified by |name|.
   void RemoveGroupByName(const std::string& name);
 
+  // Global attributes.
+  void set_msid_supported(bool supported) { msid_supported_ = supported; }
+  bool msid_supported() const { return msid_supported_; }
+
  private:
   ContentInfos contents_;
   TransportInfos transport_infos_;
   ContentGroups content_groups_;
+  bool msid_supported_ = true;
 };
 
 // Indicates whether a ContentDescription was an offer or an answer, as