When things which belong to different owners have been united so as to form a single thing and cannot be separated without injury, the whole belongs to the owner of the thing which forms the principal part, but such owner must reimburse the value of the residue to the other owner or surrender the whole to the other owner.