An inspirational teacher, charismatic museum director, Poussin scholar and curator, he was working to the end