Donating mutual funds and appreciated stock may be a better strategy than donating cash. But timing is everything. Here’s why.