Reland "Consolidate loggability checks and replace streams."

Currently we check if a message should be printed at the call site using LogMessage::Loggable, in the LogMessage itself using LogMessage::IsNoop and in LogMessage::OutputToDebug using log_to_stderr_.

This change unifies the first two of these into a early return in Log().

Bug: webrtc:8982
Change-Id: I462b1cf63c44fec46e5c59b147b2b99605aaae0c
Reviewed-on: https://webrtc-review.googlesource.com/98820
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24630}
diff --git a/rtc_base/stringutils.h b/rtc_base/stringutils.h
index d92ba02..367a673 100644
--- a/rtc_base/stringutils.h
+++ b/rtc_base/stringutils.h
@@ -329,6 +329,9 @@
 
 // TODO(jonasolsson): replace with absl::Hex when that becomes available.
 std::string ToHex(const int i);
+
+std::string LeftPad(char padding, unsigned length, std::string s);
+
 }  // namespace rtc
 
 #endif  // RTC_BASE_STRINGUTILS_H_