The ecology of reproduction in wild and domestic mammals