WPrefs: fix segfault when image not found
Previously, when an image could not be loaded by WPrefs when rendering textures
for the Appearances panel, a segfault would occur. This could happen, e.g., if
a user moved or deleted an image file without editing their ~/GNUstep/Defaults/
WindowMaker file.
This patch first checks if a texture contains an image, and if it does, it
checks to see if that image can be loaded. If it can't, a solid black texture
is loaded instead.
The patch also has the added benefit of combining some of the code used for
rendering both pixmap and textured gradient textures.