The general who headed America's biggest spy agency was profiting off stock trades involving an obscure New Jersey technology company that had a lucrative contract with one of the intelligence community's most important sources of global phone and Internet traffic. AT&T had a deal with Synchronoss Technologies Inc., of Bridgewater, to provide transaction management technology to activate all new Apple iPhones onto what was then an exclusive carrier network.