Some fixes around GrContext::abandonContext:

Fix debug crash when GrResourceCache is destroyed after GrContext is abandoned while GrTextures are in the exlusive list.

Notify debug GL context that GL resources are expected to remain undeleted when context is destroyed after being abandoned.

Stop leaking program cache entries when context is abandoned.

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/422323002
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index af746e9..95e0d51 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -516,7 +516,9 @@
 
     // Conceptually, the cache entry is going to assume responsibility
     // for the creation ref. Assert refcnt == 1.
-    SkASSERT(texture->unique());
+    // Except that this also gets called when the texture is prematurely
+    // abandoned. In that case the ref count may be > 1.
+    // SkASSERT(texture->unique());
 
     if (fGpu->caps()->reuseScratchTextures() || NULL != texture->asRenderTarget()) {
         // Since this texture came from an AutoScratchTexture it should