PgManager: Fix logging, log queries before executing, possible exceptions are logged after. Add tests for RowDict. Add tests.py - runs all tests.
### named connections
databases = {
'test' : 'host=127.0.0.1 user=test password=test dbname=test'
}
### meta database (contains connection parameters for other databases)
meta_db = 'host=10.8.0.1 dbname=central'
# query for connection parameters, input is database name (will be placed instead of %s)
meta_query = '''SELECT host, port, dbname, user, password FROM config.databases WHERE name = %s LIMIT 1'''