Clean up GenerationCache.

Use const references to keys and values where appropriate to avoid
copying them unnecessarily.

Deleted some dead code.

Simplified a few pieces that were doing unnecessary redundant work.

Change-Id: Ib2145b7094a40db2d679e05dafe050fe1e87b846
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp
index 367c627..e893f7a 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -34,8 +34,8 @@
 
 void PathCache::remove(SkPath* path) {
     // TODO: Linear search...
-    Vector<uint32_t> pathsToRemove;
-    for (uint32_t i = 0; i < mCache.size(); i++) {
+    Vector<size_t> pathsToRemove;
+    for (size_t i = 0; i < mCache.size(); i++) {
         if (mCache.getKeyAt(i).path == path) {
             pathsToRemove.push(i);
             removeTexture(mCache.getValueAt(i));