The summer stock market rally has started to cool after the S&P 500 fell modestly for a second consecutive week.