NEW YORK—A photo of another person with the same name led to the wrongful arrest of a New York City man who was exonerated and freed Thursday after spending more than 18 years behind bars for murder. The prosecution of Sheldon Thomas, now 35, “was compromised from the very start by grave errors and lack…