What was the eastern terminus of the historical railroad that ran 98.77 miles through towns including a Middlesex County town with a 2010 census population of 17659?