A senior federal judge dismissed charges last week against two public officials with long-running public disputes with President Donald Trump, saying the controversial appointment of the president’s former personal attorney as a prosecutor doomed the cases.