WIP: Convert unit testing to use dynamic postgres instance

This script is transferred from the current jenkins job, with the addition of
having support for firing up a postgres instance dynamically instead of
relying on a fixed host for these tests.

Signed-off-by: Ken Barber <ken@bob.sh>