Broadband and narrowband terahertz generation and detection in GaSe1−xSx crystals