I have been hunting for proof of this quote for a couple of days now and it seems that most uses of the quote, when references are provided, are based upon a story that Robert Lewis Dabney included in his book, "The Life and Letters of Robert Lewis Dabney pages" (See pages 497-500). It is one of those "he told me then he told me" type stories. Just do a Google Booksearch for the title of the book "The Life and Letters of Robert Lewis Dabney" and scroll down to the pages in question.
That leaves us with the possibility of at least two people being accountable for something Lee alledgedly said. And the story states the information (What laywers would call hear-say) was spread out over many years. Stockdale could have been wrong, Dabney could have been wrong or both would have to be right.
Point to consider... Robert Lewis Dabney was a Confederate chaplain and Stonewall Jackson's chief of staff and biographer. He was also very pro slavery right up to his death near the turn of the century and stood to benefit if Lee actually said it. You can read more about him online. He has a page at Wikipedia.