The cultural evolution of prosocial religions