Two British judges serving on Hong Kong's highest court have resigned, days after the conviction of 14 former pro-democracy activists and lawmakers in a prominent case involving the city's national security law.