S&P 500 rallies toward record high as Iran tensions ease