Ferroelectric thin-film waveguides in integrated optics and optoelectronics