RTC_[D]CHECK_op: Remove superfluous casts

There's no longer any need to make the two arguments have the same
signedness, so we can remove a bunch of superfluous (and sometimes
dangerous) casts.

It turned out I also had to fix the safe_cmp functions to properly handle
enums that are implicitly convertible to integers.

NOPRESUBMIT=true
BUG=webrtc:6645

Review-Url: https://codereview.webrtc.org/2534683002
Cr-Commit-Position: refs/heads/master@{#15281}
diff --git a/webrtc/base/stringutils.cc b/webrtc/base/stringutils.cc
index 48830e4..eca1362 100644
--- a/webrtc/base/stringutils.cc
+++ b/webrtc/base/stringutils.cc
@@ -57,7 +57,7 @@
     if (n-- == 0) return 0;
     c1 = transformation(*s1);
     // Double check that characters are not UTF-8
-    RTC_DCHECK_LT(static_cast<unsigned char>(*s2), 128);
+    RTC_DCHECK_LT(*s2, 128);
     // Note: *s2 gets implicitly promoted to wchar_t
     c2 = transformation(*s2);
     if (c1 != c2) return (c1 < c2) ? -1 : 1;
@@ -80,7 +80,7 @@
 #if RTC_DCHECK_IS_ON
   // Double check that characters are not UTF-8
   for (size_t pos = 0; pos < srclen; ++pos)
-    RTC_DCHECK_LT(static_cast<unsigned char>(source[pos]), 128);
+    RTC_DCHECK_LT(source[pos], 128);
 #endif
   std::copy(source, source + srclen, buffer);
   buffer[srclen] = 0;