China facing its worst national security threats since cold war, says Beijing's top official in Hong Kong as he attacks political groups in the city for foreign links.