Judge says heat in Texas prisons unconstitutional as states face mounting lawsuits