Fix a wrong logical judgment in get_target_id()

  * Wrong using 'elif' instead of 'if', then it will never judge if this target using
    the emulated image name.
  * Delete the duplicated judgment when cleanup.

Signed-off-by: Yanbing Du <ydu@redhat.com>
libirt: Add test for virsh find-storage-pool-sources-as

Signed-off-by: Yanbing Du <ydu@redhat.com>