Population density gratings produced by a pair of nonharmonic unipolar rectangular attosecond pulses in a resonant medium