The ruling protects the CFPB from the existential threat that Republicans in a bitterly divided Congress would block annual appropriations for the agency, which currently is funded by the Federal Reserve system.