Middlebury officials are working on a 10-year plan for upgrading the community’s 54-mile municipal water system — some of it more than 100 years old — that’s been springing an alarming number of leaks in recent months.