Britain’s prime minister promised to create a path to citizenship for about 3 million eligible Hongkongers if Beijing moves forward with a national security law that some of the city’s 7.5 million residents fear could undermine political freedom.