Stocks close off lows, but gains in gold, bonds, highlight jitters over geopolitics