Fixed ImageReader::computeFormat() implementation.

It was doing everything you shouldn't in a compute - having side effects, being non-threadsafe and being ridiculously slow. This knocks nearly 40% off the total runtime of an ImageReader->ImageTransform benchmark.