Chicago spent the past decade tearing up streets to replace aging, sometimes leaky water mains, borrowing more than $500 million and doubling the cost of water to pay for the work. On every one of the 792 miles dug up, crews hired by the Department of Water Management connected new cast-iron water mains to old lead pipes known as service lines. Now, with fewer than 90 miles of water mains still to be replaced, state law is forcing city workers and contractors for the first time to pull out toxic pipes at the same time.