How life history and demography promote or inhibit the evolution of helping behaviours