Regarding Mandela, in his youth he was a thug. A mindless tool of Commies and a terrorist.
In his old age, he was the man who steered a long-suffering country away from an impending civil war, toward a peaceful resolution of a conflict most people in the world could not imagine being ever resolved.
That's something. That deserves recognition, whatever his ideology and friendships are.
Don't get me wrong: Those friendships, from Joe Slovo to Muammar Kaddafi, are most disgusting. But in the end, he will remembered for the good that he did, not for these (serious) errors of judgment.
Nikita Khrushchev was a wild-eyed Communist, up to his elbows in innocent blood in the1930s in Russia and Ukraine, butcher of Hungary, etc, etc. Yet he will be remembered forever for something different: for ending Stalinism and releasing millions from the labor camps - for saving millions of lives, actually. After Khrushchev, the USSR was just another nasty authoritarian regime, where you could survive just fine, if you kept your head down - nothing like the surreal meat-grinder of the Lenin-Stalin totalitarian era.
In my family, when I was growing up in Moscow, Nikita was deeply admired. Not because we thought he was some kind of saint - we knew he was nowhere close. Simply because we owed him our lives.
Is our admiration a betrayal of those Ukrainians, Hungarians - and some fellow Poles - who were murdered under his watch, when he was just another ambitious and ruthless Comrade Commissar? I don't know. It is a hard question.