Justin Avery, 29, later confessed that he had planned to “rape” a female inmate.