[BUGFIX] Install tool sanitizes image generation output

If execute path to ImageMagick or GraphicsMagick is not configured
correctly, the "Test setup" image tests in the install tool may show
false positives and do not render an error message that the image
generation faild.
The patch adds checks and displays an error message if for example
['GFX']['im_path'] is set to an invalid path.
There are other issues in this area, for example existing test
image files may be re-used with a broken configuration. These
are also fixed with this patch.

Change-Id: Id3cf116b80371379eae9c9dc348d9daee9d5b074
Resolves: #35070
Releases: 6.2
Reviewed-on: https://review.typo3.org/23797
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring