Spatial configurations and learning rules impact on the evolution of cooperative behaviour in the n-person iterative prisoner’s dilemma