libvirt: add validation of migration hostname

The migration hostname is substituted into the libvirt migration
URI string. If the hostname contains special characters it might
be possible to construct a malicious migration URI causing libvirt
to execute arbitrary commands as root. Protect against such a risk
by validating the hostname characters.

Change-Id: Ia3c53df1a842b5ef88f1f7ed5a3f4121df698161
Closes-bug: #1276862
Merge "libvirt: add validation of migration hostname"