NEW YORK — The debate over the National Security Agency’s collection of millions of Americans’ telephone records fell squarely into the courts when a federal judge in Manhattan upheld the legality of the program, citing its need in the fight against terrorism, just days after another federal judge concluded it was likely unconstitutional. The ruling Friday by U.S. District Judge William H. Pauley III and the opposing view earlier this month by U.S. District Judge Richard Leon in Washington, D.C …