Homogenization of the planar waveguide with frequently alternating boundary conditions