leave the population that the agent is in
agent
an external pointer returned by newAgent
If agent is an R6 object, then we should use either agent$leave() or leave(agent$get)
the agent itself