After recently experiencing a stroke, screenwriter Aaron Sorkin of “Camelot” and other projects said he quit his longstanding smoking habit, a major risk factor for stroke and heart attack.