A 170-year old viaduct spanning the River Wye at Chepstow is to be refurbished at a cost of £4.6 million.