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