Optical bistability based on Fano resonances in single-and double-layer nonlinear slab waveguide gratings