The National Security Agency will cease its access to most bulk data collected under a controversial surveillance program in November, but retain records for litigation purposes, officials said Monday.