The Chinese legislature’s top decision-making body has passed and enacted national security legislation for Hong Kong, a major legal effort to restore stability in the special administrative region, which has been embroiled in about a year of social unrest.