gfxstream: make sure we consistently use uint32_t instead of int32_t to read the packet size.

A negative packet size doesn't make sense, and the code currently doesn't try to handle that scenario (ie: all 4 stream decoders do `ptr += packetLen` and as such would move backwards if the length was negative.

Further, on the encoder side, uint32_t is used (e.g.:
http://cs/android/device/generic/goldfish-opengl/system/vulkan_enc/VkEncoder.cpp;l=122;rcl=b0df973dd65f81645707f65a12e8a196a5310ef2)

Test: compiles, runs

Change-Id: Iaa0ac3fe57a3c20b419ceebe80d3b8ccec4083d7
diff --git a/stream-servers/RenderThread.cpp b/stream-servers/RenderThread.cpp
index 56557aa..87a810e 100644
--- a/stream-servers/RenderThread.cpp
+++ b/stream-servers/RenderThread.cpp
@@ -334,12 +334,12 @@
 
     uint32_t* seqnoPtr = nullptr;
 
-    while (1) {
+    while (true) {
         // Let's make sure we read enough data for at least some processing.
-        int packetSize;
+        uint32_t packetSize;
         if (readBuf.validData() >= 8) {
             // We know that packet size is the second int32_t from the start.
-            packetSize = *(const int32_t*)(readBuf.buf() + 4);
+            packetSize = *(uint32_t*)(readBuf.buf() + 4);
             if (!packetSize) {
                 // Emulator will get live-stuck here if packet size is read to be zero;
                 // crash right away so we can see these events.
@@ -353,7 +353,7 @@
         }
 
         int stat = 0;
-        if (packetSize > (int)readBuf.validData()) {
+        if (packetSize > readBuf.validData()) {
             stat = readBuf.getData(ioStream, packetSize);
             if (stat <= 0) {
                 if (doSnapshotOperation(snapshotObjects, SnapshotState::StartSaving)) {
@@ -380,9 +380,9 @@
             }
         }
 
-        DD("render thread read %d bytes, op %d, packet size %d",
-           (int)readBuf.validData(), *(int32_t*)readBuf.buf(),
-           *(int32_t*)(readBuf.buf() + 4));
+        DD("render thread read %i bytes, op %i, packet size %i",
+           readBuf.validData(), *(uint32_t*)readBuf.buf(),
+           *(uint32_t*)(readBuf.buf() + 4));
 
         //
         // log received bandwidth statistics