The global nuclear watchdog, the IAEA, formally closes a probe into Iran's past activities - a key step towards lifting sanctions.