Helena man accused of school threats sentenced