Cosmic evolution of the helium and oxygen abundances in type 2 active galactic nuclei: helium-loud AGNs