Add logging when escaping data fails in BaseDb.copy_to
When escaping a value fails when running a copy_to, there's currently no diagnostics output. This patch adds some more information as log messages.
Test Plan
tox and tox in swh.storage with the code change
Migrated from D1853 (view on Phabricator)