Cleanup various clang warnings, use unique_ptrs in several places

Change-Id: I347904b25e51fcc7de14b1e72f1acd0f6ba26f3f
diff --git a/libs/hwui/GradientCache.cpp b/libs/hwui/GradientCache.cpp
index ffd1e8c..06d234c 100644
--- a/libs/hwui/GradientCache.cpp
+++ b/libs/hwui/GradientCache.cpp
@@ -52,10 +52,10 @@
     int deltaInt = int(lhs.count) - int(rhs.count);
     if (deltaInt != 0) return deltaInt;
 
-    deltaInt = memcmp(lhs.colors, rhs.colors, lhs.count * sizeof(uint32_t));
+    deltaInt = memcmp(lhs.colors.get(), rhs.colors.get(), lhs.count * sizeof(uint32_t));
     if (deltaInt != 0) return deltaInt;
 
-    return memcmp(lhs.positions, rhs.positions, lhs.count * sizeof(float));
+    return memcmp(lhs.positions.get(), rhs.positions.get(), lhs.count * sizeof(float));
 }
 
 ///////////////////////////////////////////////////////////////////////////////