Fix GPU resource cache related assertions.

Review URL: https://codereview.chromium.org/879963003
diff --git a/include/gpu/GrResourceKey.h b/include/gpu/GrResourceKey.h
index 15d7b43..26373a7 100644
--- a/include/gpu/GrResourceKey.h
+++ b/include/gpu/GrResourceKey.h
@@ -45,6 +45,7 @@
     }
 
     bool operator==(const GrResourceKey& that) const {
+        SkASSERT(this->isValid() && that.isValid());
         return 0 == memcmp(fKey.get(), that.fKey.get(), this->size());
     }