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
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index c823d67..c1f1ef7 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -1750,7 +1750,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;