Terahertz-range spontaneous emission under the optical excitation of donors in uniaxially stressed bulk silicon and SiGe/Si heterostructures