Republicans overturned a consumer protection rule that allowed class-action lawsuits against banks.