Low-energy electronic structure of perovskite and Ruddlesden-Popper semiconductors in the Ba-Zr-S system probed by bond-selective polarized x-ray absorption spectroscopy, infrared reflectivity, and Raman scattering