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>
1: D100 Docstring missing
88:1: F401 'random' imported but unused
92:1: F401 'string' imported but unused
97:1: F401 'exc' imported but unused
105: D290 White spaces around docstring should be trimmed.
105: D400 First line should end with '.', not 'o'
116: D202 No blank lines allowed *after* function docstring, found 1
116: D400 First line should end with '.', not 'g'
116: D205 Blank line missing between one-line summary and description
321: D103 Docstring missing
327: D400 First line should end with '.', not 's'
327: D205 Blank line missing between one-line summary and description
343: D205 Blank line missing between one-line summary and description
352:21: E127 continuation line over-indented for visual indent
357:50: E502 the backslash is redundant between brackets
358:25: E127 continuation line over-indented for visual indent
358:66: E502 the backslash is redundant between brackets
359:25: E127 continuation line over-indented for visual indent
370: D205 Blank line missing between one-line summary and description
379:21: E127 continuation line over-indented for visual indent
399: D400 First line should end with '.', not '6'
399: D205 Blank line missing between one-line summary and description
416: D400 First line should end with '.', not 'r'
416: D205 Blank line missing between one-line summary and description
426:14: E127 continuation line over-indented for visual indent
430:16: E126 continuation line over-indented for hanging indent
445:45: E128 continuation line under-indented for visual indent
446:45: E128 continuation line under-indented for visual indent
455: D400 First line should end with '.', not 'd'
455: D205 Blank line missing between one-line summary and description
483: D209 Put multi-line docstring closing quotes on separate line
483: D400 First line should end with '.', not 'n'
483: D205 Blank line missing between one-line summary and description
509:32: F841 local variable 'err' is assigned to but never used
529: D209 Put multi-line docstring closing quotes on separate line
529: D400 First line should end with '.', not 'n'
529: D205 Blank line missing between one-line summary and description
543: D200 One-line docstring should not occupy 3 lines
558: D400 First line should end with '.', not 'N'
558: D205 Blank line missing between one-line summary and description
598:49: E128 continuation line under-indented for visual indent
609:82: E231 missing whitespace after ','
624: D400 First line should end with '.', not 's'
624: D205 Blank line missing between one-line summary and description
643: D209 Put multi-line docstring closing quotes on separate line
643: D205 Blank line missing between one-line summary and description
668: D103 Docstring missing
678: D103 Docstring missing
713:72: E502 the backslash is redundant between brackets
714:20: E127 continuation line over-indented for visual indent
714:44: E231 missing whitespace after ','
718:35: E261 at least two spaces before inline comment
737:21: E128 continuation line under-indented for visual indent
737:93: E231 missing whitespace after ','
755:50: E231 missing whitespace after ','
775:48: E231 missing whitespace after ','
828: D400 First line should end with '.', not 'e'
828: D205 Blank line missing between one-line summary and description
845: D400 First line should end with '.', not 's'
845: D205 Blank line missing between one-line summary and description
860: D400 First line should end with '.', not 'r'
860: D205 Blank line missing between one-line summary and description
870:10: E122 continuation line missing indentation or outdented
883: D200 One-line docstring should not occupy 3 lines
898: D400 First line should end with '.', not 'y'
898: D205 Blank line missing between one-line summary and description
917: D400 First line should end with '.', not 'L'
917: D205 Blank line missing between one-line summary and description
932: D400 First line should end with '.', not 's'
932: D200 One-line docstring should not occupy 3 lines
946: D400 First line should end with '.', not 's'
946: D200 One-line docstring should not occupy 3 lines
960: D400 First line should end with '.', not 'd'
960: D200 One-line docstring should not occupy 3 lines
974: D200 One-line docstring should not occupy 3 lines
988: D202 No blank lines allowed *after* function docstring, found 1
991: D203 Expected 1 blank line *before* class docstring, found 0
991: D204 Expected 1 blank line *after* class docstring, found 0
991: D400 First line should end with '.', not 'l'
1107: D290 White spaces around docstring should be trimmed.
1107: D400 First line should end with '.', not 's'