James McParland, Pinkerton Detective