A judge on Wednesday dismissed federal corruption charges against Eric Adams, ending the first criminal case against a New York City mayor in modern history and underscoring how prosecutorial power is being used to advance President Trump’s agenda.