The ruling strikes down Trump’s freeze on processing for immigrants from 39 countries, which left many in legal limbo.