The evolution of escaping ionizing radiation from galaxies and active galactic nuclei through cosmic time