US stocks rallied on Friday with the Dow setting a record close driven by optimism about potential progress in Iran talks