Reionization of Hydrogen and Helium by Early Stars and Quasars