loaders: JPG: Fix bussy loop on corrupted file.
Returning FALSE from the function that feeds the data into libjpeg is
wrong to begin with, in that case the library retries reading
immediatelly which ends up with the loader stuck in an infinite loop.
The correct solution in this situation is either to call the libjpeg
error handler (which we do now in case of an empty IO) or to fake end of
image marker. As faked marker will either result in error handler to be
called from the jpeg library or we may as well happen to load partially
corrupted image.
We also use the error message formatter from the libjpeg library and
print the error message using GP_WARN() now.
Signed-off-by: Cyril Hrubis <metan@ucw.cz>