Japan and South Korea have struck a deal solving a long-running World Trade Organisation (WTO) dispute over Japanese restrictions on imports of South Korean laver seaweed.