Analysis and modeling of temporal dispersion in terahertz wireless channels with applications for communication and sensing