The New York Times examines how Yahoo and some other tech firms became part of the National Security Agency’s secret Internet surveillance program against their will.