VMWare: bug fix for Vim exception handling

The exception handling in the Vim module was too broad and did not treat
the suds.MethodNotFound exception. This would result in a exception
that "__deepcopy__" is not supported in the VIM module.

In the case of an exception the VMwareAPISession class may be deleted.
The patch also ensures that the deletion is able to logout if necessary.

Closes-bug: #1228847

(cherry picked from commit be5d39eacc84c11f96357a624ffa1cdeda8a568d)

Conflicts:

	nova/tests/virt/vmwareapi/test_vmwareapi.py

Change-Id: Ic85be9b3407c444db4b3a074108c01d9141c61be
Correct the state for PAUSED instances on reboot

If an instance is in the PAUSED state before the compute node is
restarted, it will be left in an inconsistent state (impossible to
delete and/or restart it) after the node boots again.

This patch adds a check in the periodic task sync_power_state so when
this situation is detected the instance is stopped and left in a state
from where it can be started again or deleted.

Closes-Bug: #1265494
Change-Id: I7266ace596598522c28a3839091ef50faf4463c2
(cherry picked from commit 6abda5b738c5d801ede3328cf0ec1dc9dddc022f)
Merge "VMWare: bug fix for Vim exception handling" into stable/havana
Merge "Correct the state for PAUSED instances on reboot" into stable/havana
Merge remote-tracking branch 'upstream/stable/havana' into stable/havana