Dick York's exit from Bewitched looked sudden on screen, but the trouble had been building for years.