Karen Weaver was elected mayor of Flint, Mich., after promising to address the city’s water-contamination issues.