A class-action suit to be argued next week in New York’s highest court has become a test of a national strategy by civil liberties groups to challenge what they say are failed public defender programs in many states.