DS-2333 fix OOM error on large image files

https://jira.duraspace.org/browse/DS-2333

Seems there are more diffs now than earlier, sorry ... I have been working with 4.1 all along

My code changes are only around 'catch (OutOfMemoryError oome) ... return false ...