Judge rules that man once jailed for terrorism crimes must be freed from immigration center