datachannel: Make SendDataParams reliability fields optional<int>

It doesn't make sense to use negative values or 0 to disable the
feature, so we use an optional int value.
Values bigger than 65535 are clamped down.

Bug: webrtc:12730
Change-Id: I6bd9cd92f7d0a70a78cf5a7c91dca52c28d08ba1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217760
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33954}
diff --git a/api/data_channel_interface.h b/api/data_channel_interface.h
index 5b2b126..56bb6c9 100644
--- a/api/data_channel_interface.h
+++ b/api/data_channel_interface.h
@@ -44,11 +44,13 @@
   //
   // Cannot be set along with |maxRetransmits|.
   // This is called |maxPacketLifeTime| in the WebRTC JS API.
+  // Negative values are ignored, and positive values are clamped to [0-65535]
   absl::optional<int> maxRetransmitTime;
 
   // The max number of retransmissions.
   //
   // Cannot be set along with |maxRetransmitTime|.
+  // Negative values are ignored, and positive values are clamped to [0-65535]
   absl::optional<int> maxRetransmits;
 
   // This is set by the application and opaque to the WebRTC implementation.