GFXLIB: add CMake file.
GFXLIB: fix prototypes and casts.
GFXLIB: fix signed/unsigned mismatches.
GFXLIB: fix zero-ing memory shortcut trickery.
GFXLIB: fix uninitialised value warnings.