Iran has freed French man Olivier Grondeau, who has been detained in Iran since 2022, French President Emmanuel Macron says.