US stocks end lower midweek amid fading optimism over Russia-Ukraine talks