[FIX] sql_db: don't log dsn with unmasked passwords

The dsn may contain the connection password of the database when not accessed from a psycopg connection object.
Replace the unfiltered logs to use cxn.dsn avoiding password leakage in logs.
Fixes #1433
[FIX] account_analytic_plans: convert_ref method has been removed.

This issue is related to f4e350ca36668d13c9eb09fbf77c85df110ce40c