A Manhattan federal judge on Wednesday temporarily blocked the Trump administration’s cut of $34 million to protect New York’s massive transit system from terrorism, crediting the state attorney general’s allegation that the White House unlawfully tied the grant to immigration policy.