Lawyers for former President Donald J. Trump said the judge, Juan M. Merchan, has ties to Democratic causes and candidates.