British nationals in South Korea have been advised to avoid political demonstrations after the country’s president declared martial law.