I'm pretty sure that the easiest way to do this would be to have a dummy building that builds instantly, supports a unit and as soon as unit leaves you destroy it.
When population increases you tell the AI to place the building, then you deploy the unit and destroy the building.