kvm: New _with_qmp decorator
kvm: New _with_qmp decorator

The decorator takes the hypervisor and the instance object as passed
to all hotplug related commands and ensures a valid QmpConnection()
object is found in hypervisor's qmp attribute.

This decorator is responsible for all actions related to the
QmpConnection (e.g. init, connect, close) and for proper exception
propagation. In order to be safe against nested invocations we close
the connection only if we create it.

Signed-off-by: Dimitris Aragiorgis <4514117c4a99256e19437c7e3407c4ecbf98aec0@grnet.gr>
Reviewed-by: Hrvoje Ribicic <be5828fca31f89218048bec4189e30a581aa65da@google.com>

onponomarev/ganeti,dimara/ganeti,ganeti/ganeti,grnet/snf-ganeti,mbakke/ganeti,apyrgio/ganeti,leshchevds/ganeti,ganeti/ganeti,onponomarev/ganeti,mbakke/ganeti,andir/ganeti,leshchevds/ganeti,bitemyapp/ganeti,bitemyapp/ganeti,leshchevds/ganeti,dimara/ganeti,yiannist/ganeti,yiannist/ganeti,grnet/snf-ganeti,ganeti/ganeti,andir/ganeti,andir/ganeti,yiannist/ganeti,mbakke/ganeti,apyrgio/ganeti