fix postgresql drop race
fix postgresql drop race

when running under testr there is a chance that we enter
reset_databases for the postgresql tests at the same time for both
general and baremetal tests. In this case the pg admin commands
could fail, as pg gets really strict about having 2 users trying
to do admin commands at the same time on a single database (in
this case the magic template1 db, that we need to use because
you can't drop the db you are currently on.)

Solve this by breaking out the postgresql reset case into a
seperate function and using @lockutils on it.

Change-Id: I31555ef5aae27f31daf7cbbae61072a8d7deb255

n0ano/ganttclient