Geometry, D-branes and N = 1 duality in four dimensions with product gauge groups