Take a vm out of SNAPSHOTTING after Glance error

If a snapshot is attempted to be taken when Glance can't find the
underlying image (usually because it's been deleted), then ImageNotFound
is raised to nova.compute.manager.ComputeManager._snapshot_instance. The
error path for this leaves the instance in a snapshotting state; after
which "operator intervention" is required.

This simply reverts the instance state under that specific circumstance.

DocImpact: previously a snapshot that failed for this reason would leave
the instance in a spurious snapshotting task state indefinitely. Now,
the task state is reverted. At the moment that revert is 'silent'
(although the failure to snapshot will be evident to the user).

Fixes-bug: #1267097
(cherry picked from commit 96dba50737819c24b4ddd9cb1078da305638abc9)

Conflicts:

	nova/compute/manager.py

Change-Id: I9623cfaed31e8337ab65bc1eab85ad3b51b1a5ca
Explicity teardown on error in libguestfs setup()

Previously, in the setup method of the libguestfs driver
for Nova's VFS, on an error the handle object was simply
dereferenced (set to None), and then an new error was thrown.
This relied on an implicit close() on the handle being called
by GC.  However, in some cases the setup progresses far enough
that the implicit close is not enough, and leaves an "orphaned"
libguestfs VM.

Now, the teardown() method is called explicitly, which ensures that
no "orphaned" VMs are left around in case of an error.

Change-Id: I7fbe470046ce6c76bc13d77d8df360351a3ef715
Fixes: bug #1270304
(cherry picked from commit fa62cfe15fd6dddecf657966d166a2d3a2bdd317)
Merge "Explicity teardown on error in libguestfs setup()" into stable/havana
Merge "Take a vm out of SNAPSHOTTING after Glance error" into stable/havana
Merge remote-tracking branch 'upstream/stable/havana' into stable/havana