Function cApiImgScaleLQ

Scales (or crops) an image. If scaling, the aspect ratio is maintained.

Returns the path to the scaled temporary image.

Note that this function does some very poor caching; it calculates an md5
hash out of the image plus the maximum X and Y sizes, and uses that as the file
name. If the file is older than 10 minutes, regenerate it.