inveniocfg: fix PostgreSQL test connection

* Use a SQLAlchemy's independent query to test connection.

* Create a dialect depending procedure to initially test the db.

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
33:1: F401 'exc' imported but unused
34:1: F401 'InternalError' imported but unused
34:1: F401 'ProgrammingError' imported but unused
34:1: F401 'DataError' imported but unused
34:1: F401 'NotSupportedError' imported but unused
34:1: F401 'IntegrityError' imported but unused
34:1: F401 'Error' imported but unused
34:1: F401 'Warning' imported but unused
34:1: F401 'DatabaseError' imported but unused
43:1: F401 'sys' imported but unused
50:1: F401 'deserialize_via_marshal' imported but unused
50:1: F401 'serialize_via_marshal' imported but unused
54: D101 Docstring missing
55: D102 Docstring missing
74: D103 Docstring missing
538:1: W391 blank line at end of file