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: D205 Blank line missing between one-line summary and description
654: D209 Put multi-line docstring closing quotes on separate line
654: D205 Blank line missing between one-line summary and description
679: D103 Docstring missing
689: D103 Docstring missing
724:72: E502 the backslash is redundant between brackets
725:20: E127 continuation line over-indented for visual indent
725:44: E231 missing whitespace after ','
729:35: E261 at least two spaces before inline comment
748:21: E128 continuation line under-indented for visual indent
748:93: E231 missing whitespace after ','
766:50: E231 missing whitespace after ','
786:48: E231 missing whitespace after ','
839: D400 First line should end with '.', not 'e'
839: D205 Blank line missing between one-line summary and description
856: D400 First line should end with '.', not 's'
856: D205 Blank line missing between one-line summary and description
871: D400 First line should end with '.', not 'r'
871: D205 Blank line missing between one-line summary and description
881:10: E122 continuation line missing indentation or outdented
894: D200 One-line docstring should not occupy 3 lines
909: D400 First line should end with '.', not 'y'
909: D205 Blank line missing between one-line summary and description
928: D400 First line should end with '.', not 'L'
928: D205 Blank line missing between one-line summary and description
943: D400 First line should end with '.', not 's'
943: D200 One-line docstring should not occupy 3 lines
957: D400 First line should end with '.', not 's'
957: D200 One-line docstring should not occupy 3 lines
971: D400 First line should end with '.', not 'd'
971: D200 One-line docstring should not occupy 3 lines
985: D200 One-line docstring should not occupy 3 lines
999: D202 No blank lines allowed *after* function docstring, found 1
1002: D203 Expected 1 blank line *before* class docstring, found 0
1002: D204 Expected 1 blank line *after* class docstring, found 0
1002: D400 First line should end with '.', not 'l'
1118: D290 White spaces around docstring should be trimmed.
1118: D400 First line should end with '.', not 's'