The S&P 500 is near record highs. But some bearish technical headwinds may soon spell trouble for stocks.