Twenty-one municipal utilities in Massachusetts and Rhode Island are buying hydropower from century-old dams on the Connecticut River.