Altruistic bet-hedging and the evolution of cooperation in a