Fix surfaceflinger on integer sanitized builds.

Refactors unsigned integer overflows in traverseInReverseZOrder
to fix integer overflow sanitized builds.

Test: Compiled and checked output from sanitizer.
Bug: 30969751
Change-Id: I46299e7044d360e35ca35a5448b34e4299a500b7
Merged-In: I46299e7044d360e35ca35a5448b34e4299a500b7
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index ca9a546..45cabc3 100755
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -2714,7 +2714,7 @@
     LayerVector list = makeTraversalList(stateSet);
 
     int32_t i = 0;
-    for (i = list.size()-1; i>=0; i--) {
+    for (i = int32_t(list.size()) - 1; i >= 0; i--) {
         const auto& relative = list[i];
         if (relative->getZ() < 0) {
             break;