Polarization properties and diffraction efficiencies of binary anisotropic gratings: general study and experiments on ferroelectric liquid crystals