Reland "Replace gl::trace logging with Chromium style logging"

Removing one usage of FormatString() and its static buffer.
And preparation for Platform logging.

Fix incorrect enabling of ERR() calls in UNIMPLEMENTED() and
UNREACHABLE(), resulting in increased code size and
<iostream> adding 5 static initializers to chrome because of
cerr referenced in statically linked translator.

BUG=angleproject:1660

Change-Id: I7caa18036118d532e0544f75278602559172ae04
Reviewed-on: https://chromium-review.googlesource.com/431457
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/formatutils.cpp b/src/libANGLE/formatutils.cpp
index 6692d3f..928d055 100644
--- a/src/libANGLE/formatutils.cpp
+++ b/src/libANGLE/formatutils.cpp
@@ -6,8 +6,9 @@
 
 // formatutils.cpp: Queries for GL image formats.
 
-#include "common/mathutil.h"
 #include "libANGLE/formatutils.h"
+
+#include "common/mathutil.h"
 #include "libANGLE/Context.h"
 #include "libANGLE/Framebuffer.h"
 
@@ -286,6 +287,12 @@
     return invalid;
 }
 
+std::ostream &operator<<(std::ostream &os, const Format &fmt)
+{
+    // TODO(ynovikov): return string representation when available
+    return FmtHexShort(os, fmt.asSized());
+}
+
 bool InternalFormat::operator==(const InternalFormat &other) const
 {
     // We assume there are no duplicates.