Improve can_remove to avoid IntegrityError problems

Instead of having to hardcode every domain we need to check to know if we can
remove an object, make that process automated. Without this, we would have a
false positive in some cases and have an IntegrityError when someone tried to
remove that object.

Change-Id: I6f8427c3a2181263d1131788ae5f1fa20fcc844c