A power grab by Republicans in North Carolina becomes a referendum on democracy in the states