Data tests: adjust memory calculations based upon thread count (rebased onto dev_4_4)



This is the same as gh-718 but rebased onto dev_4_4.

----

This restricts the amount of memory each thread can use to open a single image (to ```testng.memory / testng.threadCount```) in order to prevent OOMs if most of the threads are attempting to open large images at the same time.  As before, if an image is too large to be opened at once, the MD5 of the upper-left-most tile will still be checked.