Electronic properties of epitaxial cerium oxide films during controlled reduction and oxidation studied by resonant inelastic X-ray scattering