The novelist Rene Denfeld on how her work as a death row investigator inspired her book and a new play