In one of the most public confrontations of a top U.S. intelligence official by Silicon Valley in recent years, a senior Yahoo Inc. official peppered the National Security Agency director, Adm. Mike Rogers, at a conference on Monday over digital spying.