Gamma-ray bursts as tracers of star-formation rate and metallicity evolution with THESEUS