Re-write onPartialImage API

Bug: 73788969
Test: If9e27a6ce2604128a619bc4843d62711f94b4d87

Add a new Exception subclass that contains information about the type of
error, and the original Exception, if any. Remove the old
IncompleteException class. If the decode creates a partial image, pass
the information up to Java, where we create the new Exception and pass
it to the callback and/or throw it. Rewrite nDecodeBitmap to always take
the ImageDecoder as a parameter for this callback, and simply use a
boolean to determine whether to call onPostProcess

Check for exceptions in some overlooked cases in native code, and
route to the new type.

Remove FIXME to avoid parsing the whole image. In my limited testing,
it didn't seem to speed anything up, and this should be called in a
background thread anyway. Parsing now also ensures that we've read the
stream when we can have a chance to handle the exception from the right
place.

Remove fixme for b/70626068, which has been marked as WontFix.

Add a TestApi for testing an Exception thrown by an InputStream.

Remove onPartialImage from hiddenapi-light-greylist.txt to fix the build
error this change introduces. onPartialImage was erroneously added to
the list.

Change-Id: I12f69857328e63c993bd669412b06addeb6a74f1
7 files changed