After risky journey, migrant and his dog say goodbye at US border