Energy enhancement and spectrum narrowing in terahertz electron sources due to negative mass instability