Reinstated a filename parameter to _grid_array_to_gdal_files() and added check to tests
Refactored the iteration code:
+ moved the named_file_generator to be module scope and then invoke it from _grid_array_to_gdal_files (so that it actually returns the content itself rather than being side-effect based)
+ moved the creation of the GDAL MEM dataset out to a separate function so that it can potentially be used for multiple GDAL output formats (e.g. GTiff)