Single-ended soft-switching electronic ballast with unity power factor