added a mutex to Dataset to serialize operations on the same dataset since GDAL is not threadsafe when used this way