Improve RTC_DCHECK_op so that it won't trigger useless compiler warnings

Before this change, with DCHECKs switched off, this sort of check

  size_t index = ...;
  RTC_DCHECK_GE(index, 0u);

would cause GCC (but no other compiler that we use) to complain
that unsigned values are always greater than or equal to 0. With
this change, it no longer complains.

(It was and remains the case that there was no complaints if
DCHECKs were switched on, or if you used RTC_CHECK_op.)

The reason for doing this change is that it isn't useful for the
compiler to force us to remove DCHECKs just because their
condition can be verified statically. That causes us to remove
the checks, and once that's happened, future code changes are free
to violate the removed checks and no one will know...

BUG=webrtc:6620

Review-Url: https://codereview.webrtc.org/2455943002
Cr-Original-Commit-Position: refs/heads/master@{#14805}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 32bcaf61f52f604c7e268533b43f1ee0a61dff43
1 file changed