Khamenei's remarks upend months of signals from Tehran to the U.S. that it wanted to negotiate over its nuclear program.