sync _reset_databases from nova, which is needed for working postgresql. Add opportunistic testing for postgresql, which will run in CI. Change-Id: I8166c2f723cabc5c5c07c7babaec8ffed5cee650