Grizzly to Havana Upgrade wipes out Nova quota_usages

Migration script 216 will wipe out all data in quota_usages table
when user_id is null. After the upgrade from Grizzly to Havana is
completed, the migration script 203 adds a new column user_id, so
user_id is null for all data in quota_usages. So the correct
behaviour should be sync quota_usages table first and then delete
data if user_id is still null.

Fixing the existing migrate script is because we can not find
the quota_usages data after migration script 216.

Closes-bug:1245746

Change-Id: I4db62884785a4eb6e1db2c5b114b9c6e1b4882ad
VMware: enable driver to work with postgres database

The hypervisor version is expected to be an integer and not
a string.  The nova/utils.py change is part of the following
patch but is not being backported as it adds new feature
functionality and is therefore not acceptable for backport

https://review.openstack.org/#/c/36073/

Closes-Bug: #1195139
(cherry picked from commit e2efa57ab2fb03b92f80abbf612a257c28475140)

Conflicts:

	nova/tests/virt/vmwareapi/test_vmwareapi.py
	nova/virt/vmwareapi/host.py

Change-Id: Ifac9ca3480191413e3a02f0dae94e452707ae82f
Merge "VMware: enable driver to work with postgres database" into stable/havana