In the case of subset decodes, we will often not decode to
the bottom of the image.  In our code before this patch,
this would result in cleanup code in onFinish() never being
called.

We can allow subclasses to take ownership of the
SkScanlineDecoder in order to make sure that it is
finished/deleted before deleting the decode manager.

BUG=skia:

Review URL: https://codereview.chromium.org/1212593003
diff --git a/tests/CodexTest.cpp b/tests/CodexTest.cpp
index 5c96990..0edd3cf 100644
--- a/tests/CodexTest.cpp
+++ b/tests/CodexTest.cpp
@@ -72,6 +72,10 @@
     if (supportsScanlineDecoding) {
         bm.eraseColor(SK_ColorYELLOW);
         REPORTER_ASSERT(r, scanlineDecoder);
+
+        // Regular decodes should be disabled after creating a scanline decoder
+        result = codec->getPixels(info, bm.getPixels(), bm.rowBytes(), NULL, NULL, NULL);
+        REPORTER_ASSERT(r, SkImageGenerator::kInvalidParameters == result);
         for (int y = 0; y < info.height(); y++) {
             result = scanlineDecoder->getScanlines(bm.getAddr(0, y), 1, 0);
             REPORTER_ASSERT(r, result == SkImageGenerator::kSuccess);