The first person charged and convicted under Hong Kong’s national security law was sentenced to nine years in prison on Friday, setting a likely precedent for how future cases will be tried.