Midterms historically precede a strong year for the S&P 500. What to know if Democrats win back Congress