Apple Chief Executive Tim Cook is joining the roster of the very rich who are giving away their wealth.