Beijing’s liaison office in city and Hong Kong and Macau Affairs Office have both lashed out at opposition primary in which more than 600,000 people voted. US Secretary of State expresses ‘grave concern’ over Chief Executive Carrie Lam’s comment that unofficial poll may have violated national security law