fix(tests): mock postgresql should wait until initialization complete

Note this required a corresponding change in deis/test-postgresql@3eba8075cffabf7deb7b32a574dbb33b956187a3.

Closes #1919.