After two years of litigation over a credit default swap deal gone bad, a federal judge has knocked out Morgan Stanley’s last counterclaim in the case, handing Citigroup a $245 million victory.