The ecology of social relationships amongst female primates