Yahoo said some of its employees knew that a “state-sponsored actor” had broken into its network two years ago.