The suits resulted from a two-month effort in April and May in which private investigators posed as buyers at 40 stores that had sold guns linked with more than 800 crimes in New York City between 1994 and 2001.