sql_db: only do frame inspection when debugging
sql_db: only do frame inspection when debugging

This affects the "Cursor not closed explicitly..." message.
The message is at a "warning" level, but the frame inspection added
some expensive overhead to each cursor open. So, avoid that unless we
are at debug mode.

splbio/openobject-server,vnc-biz/openerp-server,MarkusTeufelberger/openobject-server,MarkusTeufelberger/openobject-server,gisce/openobject-server,splbio/openobject-server,ovnicraft/openerp-server,splbio/openobject-server,vnc-biz/openerp-server,gisce/openobject-server,ovnicraft/openerp-server,MarkusTeufelberger/openobject-server,gisce/openobject-server