The adaptive dynamics of altruism in spatially heterogeneous populations