THz time-domain spectroscopy for tokamak plasma diagnostics