A child rapist died in prison, just over three years into his 17-year sentence for a string of historic sex offences.