Scattering-matrix analysis of periodically patterned multilayers with asymmetric unit cells and birefringent media