Terahertz hyper-Raman time-domain spectroscopy of gallium selenide and its application in terahertz detection