welsh town in gwynedd noted for its castle built under edward i