An Iranian nuclear scientist who once claimed he was kidnapped by the CIA has been executed after being accused of spying for the United States.