NEW YORK—Heroin was supposed to be an obsolete evil, a blurry memory of a dangerous drug that dwelled in some dark recess of American culture.