The S&P 500 and Nasdaq rose to record highs as the stock market looked past U.S.-Iran strikes to Friday's jobs report.