add an agent to a population
an external pointer to a population, for example,
one returned by newPopulation()
an external pointer to an agent, returned by newAgent() or
getAgent()
if the agent is an R6 class, we should use agent$get to get
the external pointer. Similarly, if population is an R6 object, then we
should either use population$addAgent() or population$get.