Duality relation between the Ashkin-Teller and the eight-vertex model