A former British intelligence officer who is now a director of a private security-and-investigations firm has been identified as the author of the dossier of unverified allegations about President-elect Donald Trump’s activities and connections in Russia, people familiar with the matter say.