Iran has sealed a preliminary deal with six world powers, including the U.S., to roll back its nuclear program.