Combined polynomial and near-dissociation representations for diatomic spectral data: Cl2(X) and I2(X)