This could mean ‘how Jesus sent the demons out of the man and into the pigs.’
This could mean ‘in whom the demons had lived’ or ‘who had been controlled by the evil spirits.’