The war with Iran is threatening the stock market. Here's why smart investors won't sell.