[BUGFIX] Fix resource handling in image rendering

The image rendering configuration of css_styled content is fixed so
that the image reference is correctly passed on through all further
methods.

The IMG_RESOURCE content object also accepts file or file reference
objects and will only pass on the file to TemplateService::getFileName()
if GIFBUILDER is used to prevent PHP warnings.

This fixes the image rendering after the imageLinkWrap function was
made FAL aware in #56723.

Releases: 6.2
Resolves: #56825
Change-Id: Ie6b0261de40b25aab26740b4d889a1eebc3e7a8c
Reviewed-on: https://review.typo3.org/28305
Reviewed-by: Stefan Neufeind
Reviewed-by: Xavier Perseguers
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny