Limit ApiQueryImageInfo transform calls

Apparently calls to File::transform can be slow. Add code to limit these
calls in prop=imageinfo.

The only effect for clients will be a possibility of seeing iicontinue
more often.

Once this is merged, TimedMediaHandler's ApiQueryVideoInfo.php should be
updated in the same way.

Change-Id: Id0ec6a0afb85ca73eefb5b8370c2147c37f037e9