add ogr plugin error handling to master/3.x

Adding ogr plugin extent error handling to master/3.x per the the discussion in https://github.com/mapnik/mapnik/pull/2352.