The stock market, gripped in a torpor so powerful that even peak earnings season couldn't wake it, got a jolt from an unexpected corner—Democratic presidential nominee Hillary Clinton—underscoring the political risks in the remaining days ahead of the election.