Sex allocation in animals