Flint agrees to new rules in replacing lead pipes