Integral equation modeling of multilayered doubly-periodic lossy structures using periodic boundary condition and a connection scheme