8144071: ImageIO does not reset stream if an exception is thrownSummary: Reset the I/O stream in a finally blockReviewed-by: andrewContributed-by: Jiri Vanek <jvanek@redhat.com>