SAN FRANCISCO — Mark Zuckerberg, the co-founder and chief executive of Facebook, announced that he and his wife would give 99 percent of their Facebook shares “during our lives” — holdings currently worth more than $45 billion — to charitable purposes.