x86/amd-iommu: Cleanup attach/detach_device code