The great public intellectual died in August, but he left behind a final work unlike anything else he had written before. John Gray salutes a moving life that crossed the 20th century.