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 'InternalError' imported but unused
33:1: F401 'ProgrammingError' imported but unused
33:1: F401 'DataError' imported but unused
33:1: F401 'NotSupportedError' imported but unused
33:1: F401 'IntegrityError' imported but unused
33:1: F401 'Error' imported but unused
33:1: F401 'Warning' imported but unused
33:1: F401 'DatabaseError' imported but unused
49:1: F401 'deserialize_via_marshal' imported but unused
49:1: F401 'serialize_via_marshal' imported but unused
53: D101 Docstring missing
54: D102 Docstring missing
73: D103 Docstring missing
539: D103 Docstring missing