Terahertz electromagnetic wave generation and amplification by an electron beam in the elliptical plasma waveguides with dielectric rod