Adapt to google::protobuf::uint64 type change

Protobuf 3.5.2 redefines google::protobuf::uint64 from unsigned long
long to uint64_t, which is sometimes unsigned long and sometimes
unsigned long long.  Use PRIu64 to print it, and add an implementation
of ProtoOutputStream::write for long.

Bug: 117607748
Test: m checkbuild
Change-Id: I48912f58e2f63f4a98c3aefaa4f78cc2c719bb68
diff --git a/libs/hwui/service/GraphicsStatsService.cpp b/libs/hwui/service/GraphicsStatsService.cpp
index 3d50d2d..fb1fde2 100644
--- a/libs/hwui/service/GraphicsStatsService.cpp
+++ b/libs/hwui/service/GraphicsStatsService.cpp
@@ -232,9 +232,9 @@
         return;
     }
     dprintf(fd, "\nPackage: %s", proto->package_name().c_str());
-    dprintf(fd, "\nVersion: %lld", proto->version_code());
-    dprintf(fd, "\nStats since: %lldns", proto->stats_start());
-    dprintf(fd, "\nStats end: %lldns", proto->stats_end());
+    dprintf(fd, "\nVersion: %" PRId64, proto->version_code());
+    dprintf(fd, "\nStats since: %" PRId64 "ns", proto->stats_start());
+    dprintf(fd, "\nStats end: %" PRId64 "ns", proto->stats_end());
     auto summary = proto->summary();
     dprintf(fd, "\nTotal frames rendered: %d", summary.total_frames());
     dprintf(fd, "\nJanky frames: %d (%.2f%%)", summary.janky_frames(),