The National Rifle Association’s former chief financial officer has reached a settlement with the New York attorney general’s office ahead of the second phase of a trial over claims the group and its executives misused donor money, among other alleged misconduct.