Senator Judd Gregg’s rise and fall brought to the forefront a partisan rift over how to conduct the census.