A QCD can reduce your tax bill in retirement while meeting charitable giving goals. Here’s how.