Direct conflict between Israel and Iran, which threaten global oil supplies and could drive up energy costs, has investors on edge.