A federal appeals court handed Texas a major legal victory Friday, allowing a first-of-its-kind state immigration enforcement law to take…