skia: Holding onto the image in the benchmark causes issues

Skia'a nanobench can hold onto an image, that causes the lifetime
of GrGLGpu to extend past that of the GL interface.

Kill reference to surface and image before killing the interface

Review URL: https://codereview.chromium.org/1472433002
diff --git a/bench/ImageBench.cpp b/bench/ImageBench.cpp
index 89fbcd6..b81c57c 100644
--- a/bench/ImageBench.cpp
+++ b/bench/ImageBench.cpp
@@ -39,6 +39,13 @@
         fRasterSurface.reset(SkSurface::NewRaster(info));
     }
 
+    void onPerCanvasPostDraw(SkCanvas*) override {
+        // Release the image and raster surface here to prevent out of order destruction
+        // between these and the gpu interface.
+        fRasterSurface.reset(nullptr);
+        fImage.reset(nullptr);
+    }
+
     void onDraw(int loops, SkCanvas*) override {
         for (int i = 0; i < loops; i++) {
             for (int inner = 0; inner < 10; ++inner) {