Confidence among global stock-market investors, who largely kept their cool in the face of an escalating conflict in the Middle East, is starting to wear thin.