Halligan’s departure followed a pair of orders by federal judges in Virginia that sought to replace her and accused her of “masquerading” as U.S. attorney.