By Susan Mathew and Devik Jain Feb 23 (Reuters) – U.S.stocks swung between losses and gains on Wednesday as Ukraine declared emergency amid a sweeping cyberattack on its state websites in fast-changing developments that raised fears of an all-out war with Russia. After opening higher, five of the 11 major S&P 500 sectors fell in…