Fix database connectivity for upgrades - EUCA-10276

Localhost is now used to connect to the database for entity upgrades,
previously we were using the bind address. The account alias upgrade
task is modified to use the standard approach to obtain a database
connection as connections obtained via the entity manager will not be
correctly configured for the default schema.

EUCA-10276
Fix database upgrade temporary file location - EUCA-10206
Merge remote-tracking branch 'origin/dev/sjones/EUCA-10206' into testing