Celebrated for his mastery of dialogue, he also contributed (though without credit) to the scripts of “Bonnie and Clyde” and “The Godfather.”