Epidemics on hypergraphs: spectral thresholds for extinction