The ex-sheriff and prosecutor spent his more than 40 years in office fighting battles that would burnish the Queen City’s conservative reputation.