Terry Pratchett was diagnosed with posterior cortical atrophy, a type of dementia caused by Alzheimer’s disease, in 2007 – but an analysis of his Discworld books suggests there were signs of the condition a decade earlier