Catching OutOfMemoryError when loading images.

These changes fix an OutOfMemoryError crash that occurs when clicking on an image to open the image viewer, exiting the image viewer, then opening it again:

- Added a catch block for OutOfMemoryError when loading an image to retry with a lower resolution image.
- Released image resources from imageView when exiting the Activity (to save memory).