libvirt: Fix vcpupin XML change

Test vcpupin doesn't backup and restore vm XML, making the XML change
when using '--config' option.

This commit:
* Backup and restore VM's XML using new_from_inactive_dumpxml and sync.

* Close the test block in 'try ... finally ...' to ensure VM recover in
  any case.

Signed-off-by: Hao Liu <hliu@redhat.com>