Added GDAL prototypes for raster support

Refs #23804.
Added cpl error codes to errcheck functions

GDAL raster methods return different error codes from the vector
API.
Added raster support for GDAL Driver class

Based on Daniel Wiesmann's work. Refs #23804.