Britain said on Tuesday that China’s plan to impose national security legislation on Hong Kong would undermine the autonomy and freedoms of the former British colony.